2.1.30: test suite is failing in `utest_inout` unit
cmake settings:
-- Cache values
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
CMOCKA_LIBRARY:FILEPATH=/usr/lib64/libcmocka.so
DOT_PATH:FILEPATH=/usr/bin/dot
ENABLE_COVERAGE:BOOL=OFF
ENABLE_FUZZ_TARGETS:BOOL=OFF
ENABLE_INTERNAL_DOCS:BOOL=OFF
ENABLE_PERF_TESTS:BOOL=OFF
ENABLE_STATIC:BOOL=OFF
ENABLE_TESTS:BOOL=ON
ENABLE_VALGRIND_TESTS:BOOL=OFF
LYD_VALUE_SIZE:STRING=24
PATH_EXPECT:FILEPATH=PATH_EXPECT-NOTFOUND
PATH_SHUNIT:FILEPATH=PATH_SHUNIT-NOTFOUND
PCRE2_INCLUDE_DIR:PATH=/usr/include
PCRE2_LIBRARY:FILEPATH=/usr/lib64/libpcre2-8.so
PLUGINS_DIR:STRING=/usr/lib64/modiles/libyang
PLUGINS_DIR_EXTENSIONS:STRING=/usr/lib64/modiles/libyang/extensions
PLUGINS_DIR_TYPES:STRING=/usr/lib64/modiles/libyang/types
YANG_MODULE_DIR:STRING=/usr/share/yang/modules/libyang
And test suite is failing
+ cd libyang-2.1.30
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48
Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/x86_64-redhat-linux-gnu
Test project /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/x86_64-redhat-linux-gnu
Start 1: utest_uint8
Start 2: utest_uint16
Start 3: utest_uint32
Start 4: utest_uint64
Start 5: utest_int8
Start 6: utest_int16
Start 7: utest_int32
Start 8: utest_int64
Start 9: utest_string
Start 10: utest_bits
Start 11: utest_binary
Start 12: utest_inet_types
Start 13: utest_yang_types
Start 14: utest_enumeration
Start 15: utest_instanceid
Start 16: utest_instanceid_keys
Start 17: utest_union
Start 18: utest_boolean
Start 19: utest_decimal64
Start 20: utest_empty
Start 21: utest_identityref
Start 22: utest_leafref
Start 23: utest_range
Start 24: utest_pattern
Start 25: utest_list
Start 26: utest_common
Start 27: utest_set
Start 28: utest_hash_table
Start 29: utest_inout
Start 30: utest_context
Start 31: utest_plugins
Start 32: utest_xml
Start 33: utest_json
Start 34: utest_xpath
Start 35: utest_yanglib
Start 36: utest_schema
Start 37: utest_yang
Start 38: utest_yin
Start 39: utest_tree_schema_compile
Start 40: utest_printer_tree
Start 41: utest_tree_data
Start 42: utest_new
Start 43: utest_parser_xml
Start 44: utest_printer_xml
Start 45: utest_parser_json
Start 46: utest_lyb
Start 47: utest_validation
Start 48: utest_merge
1/58 Test #1: utest_uint8 ....................... Passed 0.07 sec
Start 49: utest_diff
2/58 Test #2: utest_uint16 ...................... Passed 0.07 sec
Start 50: utest_metadata
3/58 Test #3: utest_uint32 ...................... Passed 0.07 sec
Start 51: utest_nacm
4/58 Test #4: utest_uint64 ...................... Passed 0.07 sec
Start 52: utest_yangdata
5/58 Test #5: utest_int8 ........................ Passed 0.08 sec
Start 53: utest_schema_mount
6/58 Test #6: utest_int16 ....................... Passed 0.09 sec
Start 54: utest_structure
7/58 Test #7: utest_int32 ....................... Passed 0.09 sec
Start 55: headers
8/58 Test #8: utest_int64 ....................... Passed 0.09 sec
Start 56: regress_fuzz_lys_parse_mem
9/58 Test #9: utest_string ...................... Passed 0.09 sec
Start 57: regress_fuzz_lyd_parse_mem_xml
10/58 Test #10: utest_bits ........................ Passed 0.09 sec
Start 58: regress_fuzz_lyd_parse_mem_json
11/58 Test #11: utest_binary ...................... Passed 0.09 sec
12/58 Test #12: utest_inet_types .................. Passed 0.09 sec
13/58 Test #13: utest_yang_types .................. Passed 0.09 sec
14/58 Test #14: utest_enumeration ................. Passed 0.09 sec
15/58 Test #15: utest_instanceid .................. Passed 0.09 sec
16/58 Test #16: utest_instanceid_keys ............. Passed 0.08 sec
17/58 Test #17: utest_union ....................... Passed 0.08 sec
18/58 Test #18: utest_boolean ..................... Passed 0.08 sec
19/58 Test #19: utest_decimal64 ................... Passed 0.08 sec
20/58 Test #20: utest_empty ....................... Passed 0.08 sec
21/58 Test #21: utest_identityref ................. Passed 0.08 sec
22/58 Test #22: utest_leafref ..................... Passed 0.08 sec
23/58 Test #23: utest_range ....................... Passed 0.08 sec
24/58 Test #24: utest_pattern ..................... Passed 0.07 sec
25/58 Test #25: utest_list ........................ Passed 0.07 sec
26/58 Test #26: utest_common ...................... Passed 0.07 sec
27/58 Test #27: utest_set ......................... Passed 0.07 sec
28/58 Test #28: utest_hash_table .................. Passed 0.07 sec
29/58 Test #31: utest_plugins ..................... Passed 0.07 sec
30/58 Test #32: utest_xml ......................... Passed 0.06 sec
31/58 Test #33: utest_json ........................ Passed 0.06 sec
32/58 Test #35: utest_yanglib ..................... Passed 0.06 sec
33/58 Test #29: utest_inout .......................***Failed 0.07 sec
[==========] Running 9 test(s).
[ RUN ] test_input_mem
[ OK ] test_input_mem
[ RUN ] test_input_fd
[ OK ] test_input_fd
[ RUN ] test_input_file
[ OK ] test_input_file
[ RUN ] test_input_filepath
[ OK ] test_input_filepath
[ RUN ] test_output_mem
[ OK ] test_output_mem
[ RUN ] test_output_fd
[ ERROR ] --- 0xa != 0
[ LINE ] --- /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/tests/utests/basic/test_inout.c:233: error: Failure!
[ FAILED ] test_output_fd
[ RUN ] test_output_file
[ OK ] test_output_file
[ RUN ] test_output_filepath
[ OK ] test_output_filepath
[ RUN ] test_output_clb
[ OK ] test_output_clb
[==========] 9 test(s) run.
[ PASSED ] 8 test(s).
[ FAILED ] 1 test(s), listed below:
[ FAILED ] test_output_fd
1 FAILED TEST(S)
34/58 Test #34: utest_xpath ....................... Passed 0.06 sec
35/58 Test #42: utest_new ......................... Passed 0.05 sec
36/58 Test #44: utest_printer_xml ................. Passed 0.05 sec
37/58 Test #48: utest_merge ....................... Passed 0.04 sec
38/58 Test #50: utest_metadata .................... Passed 0.03 sec
39/58 Test #51: utest_nacm ........................ Passed 0.03 sec
40/58 Test #52: utest_yangdata .................... Passed 0.03 sec
41/58 Test #54: utest_structure ................... Passed 0.02 sec
42/58 Test #45: utest_parser_json ................. Passed 0.05 sec
43/58 Test #41: utest_tree_data ................... Passed 0.06 sec
44/58 Test #36: utest_schema ...................... Passed 0.07 sec
45/58 Test #47: utest_validation .................. Passed 0.05 sec
46/58 Test #43: utest_parser_xml .................. Passed 0.06 sec
47/58 Test #37: utest_yang ........................ Passed 0.08 sec
48/58 Test #30: utest_context ..................... Passed 0.09 sec
49/58 Test #46: utest_lyb ......................... Passed 0.07 sec
50/58 Test #49: utest_diff ........................ Passed 0.06 sec
51/58 Test #57: regress_fuzz_lyd_parse_mem_xml .... Passed 0.06 sec
52/58 Test #39: utest_tree_schema_compile ......... Passed 0.13 sec
53/58 Test #58: regress_fuzz_lyd_parse_mem_json ... Passed 0.09 sec
54/58 Test #53: utest_schema_mount ................ Passed 0.12 sec
55/58 Test #38: utest_yin ......................... Passed 0.17 sec
56/58 Test #40: utest_printer_tree ................ Passed 0.18 sec
57/58 Test #55: headers ........................... Passed 0.20 sec
58/58 Test #56: regress_fuzz_lys_parse_mem ........ Passed 0.27 sec
98% tests passed, 1 tests failed out of 58
Total Test time (real) = 0.41 sec
The following tests FAILED:
29 - utest_inout (Failed)
Errors while running CTest
I do not think I can help you with this. Can you even reproduce the problem reliably? I found nothing thread-unsafe in the test, it is just supposed to create a file, write 10 bytes into it and then check that the counter of written bytes is 10. No idea why would it not be.
I do not think I can help you with this. Can you even reproduce the problem reliably?
Whatyou mean? 🤔 It fails on multiple test suite execution .. all the time.
I found nothing thread-unsafe in the test, it is just supposed to create a file, write 10 bytes into it and then check that the counter of written bytes is 10. No idea why would it not be.
OK so so what I can try to do to diagnose that? 🤔
Strange indeed -- it passes in GitHub CI on multiple platforms (Ubuntu, Mac OS X, Windows), it passes on my super-weird NixOS linux, I know that it also passes on Arch and on Fedora. Something must be different in your particular environment, different from this heterogeneous mixture of hosts where the test suite passes just fine.
Since we cannot reproduce this and some quick eyeballing doesn't find anything fishy in the code, it's up to you to find out more details I'm afraid. The test calls ly_out_printed which simply checks (struct ly_out).func_printed, so I would start with either adding a bunch of printf()s around all printing functions, or stepping via a debugger and checking which printing thing fails. Chances are that there's some bug in the code in libyang, or in your system -- but it's impossible to tell without additional details.
Also, anything fancy when you run the test via strace?
IIRC Fedora runs all builds with -j6. If it is something related to threading maybe because I have box with 24 physical cores and I'm running everything with -j48?🤔
Also, anything fancy when you run the test via strace?
Here is the strace file generate by comman strace -f -o libyang-ctest-utest_inout.txt ctest -R utest_inout --test-dir x86_64-redhat-linux-gnu --output-on-failure
libyang-ctest-utest_inout.txt
Can you drop some patch with some printf() instrumentaion which could expose that issue? 🤔
you might want to give bug1977.patch.txt a try; it will break other tests, so just run ./tests/utest_inout from the build dir
Here is the output:
+ cd libyang-2.1.30
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48
Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/x86_64-redhat-linux-gnu
Test project /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/x86_64-redhat-linux-gnu
Start 1: utest_uint8
Start 2: utest_uint8_valgrind
Start 3: utest_uint16
Start 4: utest_uint16_valgrind
Start 5: utest_uint32
Start 6: utest_uint32_valgrind
Start 7: utest_uint64
Start 8: utest_uint64_valgrind
Start 9: utest_int8
Start 10: utest_int8_valgrind
Start 11: utest_int16
Start 12: utest_int16_valgrind
Start 13: utest_int32
Start 14: utest_int32_valgrind
Start 15: utest_int64
Start 16: utest_int64_valgrind
Start 17: utest_string
Start 18: utest_string_valgrind
Start 19: utest_bits
Start 20: utest_bits_valgrind
Start 21: utest_binary
Start 22: utest_binary_valgrind
Start 23: utest_inet_types
Start 24: utest_inet_types_valgrind
Start 25: utest_yang_types
Start 26: utest_yang_types_valgrind
Start 27: utest_enumeration
Start 28: utest_enumeration_valgrind
Start 29: utest_instanceid
Start 30: utest_instanceid_valgrind
Start 31: utest_instanceid_keys
Start 32: utest_instanceid_keys_valgrind
Start 33: utest_union
Start 34: utest_union_valgrind
Start 35: utest_boolean
Start 36: utest_boolean_valgrind
Start 37: utest_decimal64
Start 38: utest_decimal64_valgrind
Start 39: utest_empty
Start 40: utest_empty_valgrind
Start 41: utest_identityref
Start 42: utest_identityref_valgrind
Start 43: utest_leafref
Start 44: utest_leafref_valgrind
Start 45: utest_range
Start 46: utest_range_valgrind
Start 47: utest_pattern
Start 48: utest_pattern_valgrind
1/115 Test #1: utest_uint8 .......................... Passed 0.08 sec
Start 49: utest_list
2/115 Test #3: utest_uint16 ......................... Passed 0.08 sec
Start 50: utest_list_valgrind
3/115 Test #5: utest_uint32 ......................... Passed 0.08 sec
Start 51: utest_common
4/115 Test #7: utest_uint64 ......................... Passed 0.08 sec
Start 52: utest_common_valgrind
5/115 Test #9: utest_int8 ........................... Passed 0.08 sec
Start 53: utest_set
6/115 Test #11: utest_int16 .......................... Passed 0.08 sec
Start 54: utest_set_valgrind
7/115 Test #13: utest_int32 .......................... Passed 0.08 sec
Start 55: utest_hash_table
8/115 Test #15: utest_int64 .......................... Passed 0.08 sec
Start 56: utest_hash_table_valgrind
9/115 Test #17: utest_string ......................... Passed 0.08 sec
Start 57: utest_inout
10/115 Test #19: utest_bits ........................... Passed 0.08 sec
Start 58: utest_inout_valgrind
11/115 Test #21: utest_binary ......................... Passed 0.08 sec
Start 59: utest_context
12/115 Test #23: utest_inet_types ..................... Passed 0.08 sec
Start 60: utest_context_valgrind
13/115 Test #25: utest_yang_types ..................... Passed 0.08 sec
Start 61: utest_plugins
14/115 Test #27: utest_enumeration .................... Passed 0.07 sec
Start 62: utest_plugins_valgrind
15/115 Test #29: utest_instanceid ..................... Passed 0.07 sec
Start 63: utest_xml
16/115 Test #31: utest_instanceid_keys ................ Passed 0.07 sec
Start 64: utest_xml_valgrind
17/115 Test #33: utest_union .......................... Passed 0.07 sec
Start 65: utest_json
18/115 Test #35: utest_boolean ........................ Passed 0.07 sec
Start 66: utest_json_valgrind
19/115 Test #37: utest_decimal64 ...................... Passed 0.07 sec
Start 67: utest_xpath
20/115 Test #39: utest_empty .......................... Passed 0.07 sec
Start 68: utest_xpath_valgrind
21/115 Test #41: utest_identityref .................... Passed 0.07 sec
Start 69: utest_yanglib
22/115 Test #43: utest_leafref ........................ Passed 0.07 sec
Start 70: utest_yanglib_valgrind
23/115 Test #45: utest_range .......................... Passed 0.07 sec
Start 71: utest_schema
24/115 Test #47: utest_pattern ........................ Passed 0.07 sec
Start 72: utest_schema_valgrind
25/115 Test #49: utest_list ........................... Passed 0.06 sec
Start 73: utest_yang
26/115 Test #51: utest_common ......................... Passed 0.06 sec
Start 74: utest_yang_valgrind
27/115 Test #53: utest_set ............................ Passed 0.06 sec
Start 75: utest_yin
28/115 Test #55: utest_hash_table ..................... Passed 0.06 sec
Start 76: utest_yin_valgrind
29/115 Test #57: utest_inout ..........................***Failed 0.05 sec
[==========] Running 1 test(s).
[ RUN ] test_output_fd
*** ly_print: begin
ly_vprint_: begin
calling vdprintf(4, "test %s", ...)
written = 0
ly_vprint_: out->printed = 0, out->func_printed = 0, written = 0
*** ly_print: returning 0
[ ERROR ] --- 0x29a != 0
[ LINE ] --- /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/tests/utests/basic/test_inout.c:233: error: Failure!
[ FAILED ] test_output_fd
[==========] 1 test(s) run.
[ PASSED ] 0 test(s).
[ FAILED ] 1 test(s), listed below:
[ FAILED ] test_output_fd
1 FAILED TEST(S)
Start 77: utest_tree_schema_compile
30/115 Test #61: utest_plugins ........................ Passed 0.05 sec
Start 78: utest_tree_schema_compile_valgrind
31/115 Test #63: utest_xml ............................ Passed 0.04 sec
Start 79: utest_printer_tree
32/115 Test #65: utest_json ........................... Passed 0.04 sec
Start 80: utest_printer_tree_valgrind
33/115 Test #69: utest_yanglib ........................ Passed 0.04 sec
Start 81: utest_tree_data
34/115 Test #67: utest_xpath .......................... Passed 0.09 sec
Start 82: utest_tree_data_valgrind
35/115 Test #59: utest_context ........................ Passed 0.17 sec
Start 83: utest_new
36/115 Test #71: utest_schema ......................... Passed 0.14 sec
Start 84: utest_new_valgrind
37/115 Test #73: utest_yang ........................... Passed 0.15 sec
Start 85: utest_parser_xml
38/115 Test #83: utest_new ............................ Passed 0.03 sec
Start 86: utest_parser_xml_valgrind
39/115 Test #81: utest_tree_data ...................... Passed 0.16 sec
Start 87: utest_printer_xml
40/115 Test #87: utest_printer_xml .................... Passed 0.05 sec
Start 88: utest_printer_xml_valgrind
41/115 Test #77: utest_tree_schema_compile ............ Passed 0.23 sec
Start 89: utest_parser_json
42/115 Test #85: utest_parser_xml ..................... Passed 0.11 sec
Start 90: utest_parser_json_valgrind
43/115 Test #75: utest_yin ............................ Passed 0.33 sec
Start 91: utest_lyb
44/115 Test #89: utest_parser_json .................... Passed 0.16 sec
Start 92: utest_lyb_valgrind
45/115 Test #79: utest_printer_tree ................... Passed 0.46 sec
Start 93: utest_validation
46/115 Test #91: utest_lyb ............................ Passed 0.16 sec
Start 94: utest_validation_valgrind
47/115 Test #93: utest_validation ..................... Passed 0.20 sec
Start 95: utest_merge
48/115 Test #95: utest_merge .......................... Passed 0.10 sec
Start 96: utest_merge_valgrind
49/115 Test #4: utest_uint16_valgrind ................ Passed 1.95 sec
Start 97: utest_diff
50/115 Test #14: utest_int32_valgrind ................. Passed 1.98 sec
Start 98: utest_diff_valgrind
51/115 Test #16: utest_int64_valgrind ................. Passed 2.00 sec
Start 99: utest_metadata
52/115 Test #99: utest_metadata ....................... Passed 0.01 sec
Start 100: utest_metadata_valgrind
53/115 Test #6: utest_uint32_valgrind ................ Passed 2.05 sec
Start 101: utest_nacm
54/115 Test #101: utest_nacm ........................... Passed 0.02 sec
Start 102: utest_nacm_valgrind
55/115 Test #58: utest_inout_valgrind .................***Failed 1.98 sec
==1996239== Memcheck, a memory error detector
==1996239== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==1996239== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==1996239== Command: /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/x86_64-redhat-linux-gnu/tests/utest_inout
==1996239==
[==========] Running 1 test(s).
[ RUN ] test_output_fd
*** ly_print: begin
ly_vprint_: begin
calling vdprintf(4, "test %s", ...)
written = 0
ly_vprint_: out->printed = 0, out->func_printed = 0, written = 0
*** ly_print: returning 0
[ ERROR ] --- 0x29a != 0
[ LINE ] --- /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/tests/utests/basic/test_inout.c:233: error: Failure!
[ FAILED ] test_output_fd
[==========] 1 test(s) run.
[ PASSED ] 0 test(s).
[ FAILED ] 1 test(s), listed below:
[ FAILED ] test_output_fd
1 FAILED TEST(S)
==1996239==
==1996239== HEAP SUMMARY:
==1996239== in use at exit: 80 bytes in 1 blocks
==1996239== total heap usage: 4,944 allocs, 4,943 frees, 1,644,653 bytes allocated
==1996239==
==1996239== 80 bytes in 1 blocks are definitely lost in loss record 1 of 1
==1996239== at 0x4846464: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1996239== by 0x13D0E7: ly_out_new_fd (out.c:151)
==1996239== by 0x13DDB8: test_output_fd (test_inout.c:231)
==1996239== by 0x486B8DF: ??? (in /usr/lib64/libcmocka.so.0.7.0)
==1996239== by 0x486C64D: _cmocka_run_group_tests (in /usr/lib64/libcmocka.so.0.7.0)
==1996239== by 0x113E80: main (test_inout.c:400)
==1996239==
==1996239== LEAK SUMMARY:
==1996239== definitely lost: 80 bytes in 1 blocks
==1996239== indirectly lost: 0 bytes in 0 blocks
==1996239== possibly lost: 0 bytes in 0 blocks
==1996239== still reachable: 0 bytes in 0 blocks
==1996239== suppressed: 0 bytes in 0 blocks
==1996239==
==1996239== For lists of detected and suppressed errors, rerun with: -s
==1996239== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Start 103: utest_yangdata
56/115 Test #8: utest_uint64_valgrind ................ Passed 2.08 sec
Start 104: utest_yangdata_valgrind
57/115 Test #97: utest_diff ........................... Passed 0.13 sec
Start 105: utest_schema_mount
58/115 Test #103: utest_yangdata ....................... Passed 0.02 sec
Start 106: utest_schema_mount_valgrind
59/115 Test #32: utest_instanceid_keys_valgrind ....... Passed 2.08 sec
Start 107: utest_structure
60/115 Test #2: utest_uint8_valgrind ................. Passed 2.42 sec
Start 108: utest_structure_valgrind
61/115 Test #12: utest_int16_valgrind ................. Passed 2.41 sec
Start 109: headers
62/115 Test #40: utest_empty_valgrind ................. Passed 2.36 sec
Start 110: regress_fuzz_lys_parse_mem
63/115 Test #105: utest_schema_mount ................... Passed 0.33 sec
Start 111: regress_fuzz_lyd_parse_mem_xml
64/115 Test #107: utest_structure ...................... Passed 0.02 sec
Start 112: regress_fuzz_lyd_parse_mem_json
65/115 Test #36: utest_boolean_valgrind ............... Passed 2.39 sec
Start 113: yanglint_in_list
66/115 Test #38: utest_decimal64_valgrind ............. Passed 2.45 sec
Start 114: yanglint_in_feature
67/115 Test #42: utest_identityref_valgrind ........... Passed 2.45 sec
Start 115: yanglint_in_completion
68/115 Test #111: regress_fuzz_lyd_parse_mem_xml ....... Passed 0.10 sec
69/115 Test #115: yanglint_in_completion ............... Passed 0.04 sec
70/115 Test #28: utest_enumeration_valgrind ........... Passed 2.53 sec
71/115 Test #112: regress_fuzz_lyd_parse_mem_json ...... Passed 0.14 sec
72/115 Test #70: utest_yanglib_valgrind ............... Passed 2.47 sec
73/115 Test #22: utest_binary_valgrind ................ Passed 2.93 sec
74/115 Test #24: utest_inet_types_valgrind ............ Passed 2.93 sec
75/115 Test #26: utest_yang_types_valgrind ............ Passed 2.93 sec
76/115 Test #30: utest_instanceid_valgrind ............ Passed 2.92 sec
77/115 Test #34: utest_union_valgrind ................. Passed 2.91 sec
78/115 Test #44: utest_leafref_valgrind ............... Passed 2.90 sec
79/115 Test #48: utest_pattern_valgrind ............... Passed 2.89 sec
80/115 Test #56: utest_hash_table_valgrind ............ Passed 2.87 sec
81/115 Test #62: utest_plugins_valgrind ............... Passed 2.85 sec
82/115 Test #109: headers .............................. Passed 0.54 sec
83/115 Test #110: regress_fuzz_lys_parse_mem ........... Passed 0.54 sec
84/115 Test #54: utest_set_valgrind ................... Passed 2.90 sec
85/115 Test #52: utest_common_valgrind ................ Passed 2.99 sec
86/115 Test #46: utest_range_valgrind ................. Passed 3.06 sec
87/115 Test #66: utest_json_valgrind .................. Passed 3.00 sec
88/115 Test #84: utest_new_valgrind ................... Passed 2.89 sec
89/115 Test #88: utest_printer_xml_valgrind ........... Passed 2.85 sec
90/115 Test #64: utest_xml_valgrind ................... Passed 3.12 sec
91/115 Test #113: yanglint_in_list .....................***Failed 1.02 sec
spawn /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/x86_64-redhat-linux-gnu/yanglint
> list
*** ly_print: begin
ly_vprint_: begin
List of the loaded models:
ly_vprint_: out->printed = 27, out->func_printed = 27, written = 27
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 32, out->func_printed = 5, written = 5
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 51, out->func_printed = 19, written = 19
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 62, out->func_printed = 11, written = 11
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
i ietf-yang-metadata@2016-08-05
ly_vprint_: out->printed = 63, out->func_printed = 1, written = 1
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 68, out->func_printed = 5, written = 5
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 73, out->func_printed = 5, written = 5
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 84, out->func_printed = 11, written = 11
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
I yang@2022-06-16
ly_vprint_: out->printed = 85, out->func_printed = 1, written = 1
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 90, out->func_printed = 5, written = 5
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 106, out->func_printed = 16, written = 16
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 117, out->func_printed = 11, written = 11
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
i ietf-inet-types@2013-07-15
ly_vprint_: out->printed = 118, out->func_printed = 1, written = 1
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 123, out->func_printed = 5, written = 5
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 139, out->func_printed = 16, written = 16
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 150, out->func_printed = 11, written = 11
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
i ietf-yang-types@2013-07-15
ly_vprint_: out->printed = 151, out->func_printed = 1, written = 1
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 156, out->func_printed = 5, written = 5
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 179, out->func_printed = 23, written = 23
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 190, out->func_printed = 11, written = 11
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
I ietf-yang-schema-mount@2019-01-14
ly_vprint_: out->printed = 191, out->func_printed = 1, written = 1
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 196, out->func_printed = 5, written = 5
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 220, out->func_printed = 24, written = 24
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ly_vprint_: out->printed = 231, out->func_printed = 11, written = 11
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
i ietf-yang-structure-ext@2020-06-17
ly_vprint_: out->printed = 232, out->func_printed = 1, written = 1
*** ly_print: returning 0
>
92/115 Test #114: yanglint_in_feature ..................***Failed 1.02 sec
spawn /home/tkloczko/rpmbuild/BUILD/libyang-2.1.30/x86_64-redhat-linux-gnu/yanglint
> feature -a
*** ly_print: begin
ly_vprint_: begin
yang:
ly_vprint_: out->printed = 6, out->func_printed = 6, written = 6
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
(none)
ly_vprint_: out->printed = 15, out->func_printed = 9, written = 9
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
ietf-yang-schema-mount:
ly_vprint_: out->printed = 39, out->func_printed = 24, written = 24
*** ly_print: returning 0
*** ly_print: begin
ly_vprint_: begin
(none)
ly_vprint_: out->printed = 48, out->func_printed = 9, written = 9
*** ly_print: returning 0
>
93/115 Test #50: utest_list_valgrind .................. Passed 3.95 sec
94/115 Test #100: utest_metadata_valgrind .............. Passed 2.10 sec
95/115 Test #102: utest_nacm_valgrind .................. Passed 2.06 sec
96/115 Test #20: utest_bits_valgrind .................. Passed 4.15 sec
97/115 Test #104: utest_yangdata_valgrind .............. Passed 2.17 sec
98/115 Test #96: utest_merge_valgrind ................. Passed 3.48 sec
99/115 Test #90: utest_parser_json_valgrind ........... Passed 4.03 sec
100/115 Test #108: utest_structure_valgrind ............. Passed 2.02 sec
101/115 Test #68: utest_xpath_valgrind ................. Passed 4.34 sec
102/115 Test #10: utest_int8_valgrind .................. Passed 4.51 sec
103/115 Test #18: utest_string_valgrind ................ Passed 4.51 sec
104/115 Test #86: utest_parser_xml_valgrind ............ Passed 4.38 sec
105/115 Test #82: utest_tree_data_valgrind ............. Passed 4.48 sec
106/115 Test #72: utest_schema_valgrind ................ Passed 4.87 sec
107/115 Test #94: utest_validation_valgrind ............ Passed 4.42 sec
108/115 Test #92: utest_lyb_valgrind ................... Passed 4.76 sec
109/115 Test #74: utest_yang_valgrind .................. Passed 5.41 sec
110/115 Test #60: utest_context_valgrind ............... Passed 5.79 sec
111/115 Test #98: utest_diff_valgrind .................. Passed 4.18 sec
112/115 Test #106: utest_schema_mount_valgrind .......... Passed 5.52 sec
113/115 Test #78: utest_tree_schema_compile_valgrind ... Passed 7.74 sec
114/115 Test #80: utest_printer_tree_valgrind .......... Passed 8.34 sec
115/115 Test #76: utest_yin_valgrind ................... Passed 8.67 sec
97% tests passed, 4 tests failed out of 115
Total Test time (real) = 9.15 sec
The following tests FAILED:
57 - utest_inout (Failed)
58 - utest_inout_valgrind (Failed)
113 - yanglint_in_list (Failed)
114 - yanglint_in_feature (Failed)
Errors while running CTest
Your implementation of the vdprintf function returns 0 even though it is asked to write out some data (and according to strace, it indeed writes out some data). That looks like a broken C library. What platform exactly are you on? Is that rawhide, maybe, or some non-glibc thing?
glibc from Fedora rawhide. Interesting how it will be with just released glibc 2.37? 🤔