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

tests: add new targets for running valgrind and clangtidy #2257

Closed MagnusS closed 4 months ago

MagnusS commented 4 months ago

Cleans up test/CMakeLists.txt and adds valgrind and clangtidy targets. See commit messages for details.

MagnusS commented 4 months ago

Results from the v0.16.0 branch:

$ cmake -L unit
[..]
98% tests passed, 2 tests failed out of 84

Label Time Summary:
unit    =   2.87 sec*proc (84 tests)

Total Test time (real) =   2.89 sec

The following tests FAILED:
        199 - fixed_list_alloc_test_unit (SEGFAULT)
        211 - logger_test_unit (Failed)
[..]

$ ctest -L memcheck -j 24
[..]
77% tests passed, 19 tests failed out of 84

Label Time Summary:
memcheck    = 231.69 sec*proc (84 tests)

Total Test time (real) =  58.38 sec

The following tests FAILED:
         14 - unit_fat_memcheck (Failed)
         20 - usernet_memcheck (Failed)
         38 - test_memory_memcheck (Failed)
         44 - rng_memcheck (Failed)
         50 - test_hal_memcheck (Failed)
         56 - unit_liveupdate_memcheck (Failed)
         77 - conntrack_test_memcheck (Failed)
        116 - ip4_memcheck (Failed)
        134 - nat_test_memcheck (Failed)
        137 - napt_test_memcheck (Failed)
        149 - router_test_memcheck (Failed)
        152 - socket_memcheck (Failed)
        161 - tcp_packet_test_memcheck (Failed)
        173 - fd_map_test_memcheck (Failed)
        197 - delegate_memcheck (Failed)
        200 - fixed_list_alloc_test_memcheck (Subprocess aborted)
        212 - logger_test_memcheck (Failed)
        215 - membitmap_memcheck (Failed)
        227 - pmr_alloc_test_memcheck (Failed)
[..]

$ ctest -L clangtidy -j 24
[..]
90% tests passed, 8 tests failed out of 84

Label Time Summary:
clangtidy    = 1484.87 sec*proc (84 tests)

Total Test time (real) = 103.26 sec

The following tests FAILED:
         39 - test_memory_clangtidy (Failed)
         42 - os_test_clangtidy (Failed)
         51 - test_hal_clangtidy (Failed)
         63 - x86_paging_clangtidy (Failed)
         81 - cookie_test_clangtidy (Failed)
        189 - buddy_alloc_test_clangtidy (Failed)
        249 - test_lstack_merging_clangtidy (Failed)
        252 - test_lstack_nomerge_clangtidy (Failed)
[..]
alfreb commented 4 months ago

Oh, this is gold, nice! Running clangtidy pass now.