eriptic / uoscore-uedhoc

C implementations for constrained (and non-constrained) devices of the IETF protocols OSCORE and EDHOC
Other
15 stars 15 forks source link

Problem with old Ztest API in tests #50

Closed gopiotr closed 8 months ago

gopiotr commented 1 year ago

Hi,

Tests placed in test directory use Ztest test framework from Zephyr project: https://github.com/eriptic/uoscore-uedhoc/blob/5fe2cb613bd7e4590bd1b00c2adf181ac0229379/test/main.c#L125-L196

From Zephyr 3.1 new Ztest API were introduced with no backward compatibility. From Zephyr 3.4 (with release date set as June 16, 2023), old Ztest API will be deprecated. This could make a problem during building those tests with Zephyr 3.4 or newer.

So if those tests are valuable and there is a plan to maintain them in the future, it should be considered to rewrite them to new Ztest API (or at least add information which Zephyr version should be used for those tests).

New Ztest API description: https://docs.zephyrproject.org/latest/develop/test/ztest.html

Old (deprecated) Ztest API description: https://docs.zephyrproject.org/latest/develop/test/ztest_deprecated.html

Example of "migration" to new Ztest API in Zephyr project: https://github.com/zephyrproject-rtos/zephyr/pull/44761

Common issue in Zephyr project which contains basic instruction and hints for migration: https://github.com/zephyrproject-rtos/zephyr/issues/47002

StefanHri commented 1 year ago

Thanks gopiotr for letting us know. We will rewrite them.

StefanHri commented 8 months ago

We adopted the new API.