includeos / IncludeOS

A minimal, resource efficient unikernel for cloud services
https://includeos.github.io/
Apache License 2.0
4.93k stars 365 forks source link

Throw exception if Expects/Ensures fails when UNITTESTS is set #2255

Closed MagnusS closed 4 months ago

MagnusS commented 4 months ago

Previously some unit tests would fail on calls to EXPECTS_THROW as the OS would panic. This throws an exception instead to allow those tests to proceed without failing.

MagnusS commented 4 months ago

Fixes the tests x86_paging, cidr, test_lstack_nodes, test_lstack_merging and test_lstack_nomerge.

MagnusS commented 4 months ago

Force pushed an update to use UNITTESTS instead of TEST as this was more reliable and fixed a few more tests (path_test, tcp_packet_test). UNITTESTS is set in https://github.com/includeos/IncludeOS/blob/v0.16.0-release/test/CMakeLists.txt#L56.

alfreb commented 4 months ago

Nice, only 5 left! (all the others confirmed passing here)