What is the recommended way to run tests? If I use make check (as most Linux distros seem do to), it only runs 3 tests and they pass. If instead I run perl src/run-tests.pl, then I get these failures (this is on Void Linux, with perl perl-Clone perl-enum installed during check phase):
=> isync-1.5.1_1: running do_check ...
Testing: full ...
readline() on closed filehandle FILE at src/run-tests.pl line 355.
at src/run-tests.pl line 355.
main::runsync(0, "-Tj -TJ", "1-initial.log") called at src/run-tests.pl line 795
main::test_impl(0, HASH(0x55b295051940), HASH(0x55b294c38888), ARRAY(0x55b295081750)) called at src/run-tests.pl line 939
main::test("full", ARRAY(0x55b295063940), ARRAY(0x55b2950817c8), ARRAY(0x55b295081750)) called at src/run-tests.pl line 1014
MAXUID mismatch for 'far': got 15, wanted 17
Flag mismatch for far:4:B: got -, wanted F
Flag mismatch for far:8:F: got -, wanted T
Flag mismatch for far:11:G: got F, wanted FT
Missing message far:16:L
Missing message far:17:M
MAXUID mismatch for 'near': got 15, wanted 17
Flag mismatch for near:3:A: got -, wanted F
Flag mismatch for near:5:C: got F, wanted FS
Flag mismatch for near:7:E: got -, wanted T
Flag mismatch for near:12:H: got -, wanted FT
Flag mismatch for near:13:I: got -, wanted T
Missing message near:16:J
Missing message near:17:K
Sync state header entry MaxPulledUid mismatch: got 13, wanted 17
Sync state header entry MaxPushedUid mismatch: got 13, wanted 17
Unexpected sync state entry: got 1:1 (0), wanted 3:3 (A)
Input:
[ 15,
R, 2, "", A, 3, "F", B, 4, "", C, 5, "FS", D, 6, "", E, 7, "T", F, 8, "", O, 9, "T", G, 11, "F", H, 12, "FT", J, 14, "T", K, 15, "P" ],
[ 15,
S, 2, "", A, 3, "", B, 4, "F", C, 5, "F", D, 6, "", E, 7, "", F, 8, "T", O, 9, "T", Q, 10, "T", H, 12, "", I, 13, "", L, 14, "T", M, 15, "" ],
[ 13, 0, 13, 0,
1, 1, "", 3, 3, "", 4, 4, "", 5, 5, "", 6, 6, "", 7, 7, "", 8, 8, "", 9, 9, "T", 10, 10, "T", 11, 11, "", 12, 12, "", 13, 13, "" ],
Options:
[ "", "", "" ]
Expected result:
[ 17,
R, 2, "", A, 3, "F", B, 4, "F", C, 5, "FS", D, 6, "", E, 7, "T", F, 8, "T", O, 9, "T", G, 11, "FT", H, 12, "FT", J, 14, "T", K, 15, "P", L, 16, "T", M, 17, "" ],
[ 17,
S, 2, "", A, 3, "F", B, 4, "F", C, 5, "FS", D, 6, "", E, 7, "T", F, 8, "T", O, 9, "T", Q, 10, "T", H, 12, "FT", I, 13, "T", L, 14, "T", M, 15, "", J, 16, "T", K, 17, "P" ],
[ 17, 0, 17, 0,
3, 3, "F", 4, 4, "F", 5, 5, "FS", 6, 6, "", 7, 7, "T", 8, 8, "T", 9, 9, "T", 0, 10, "T", 11, 0, "", 12, 12, "FT", 0, 13, "", 16, 14, "T", 17, 15, "", 14, 16, "T", 15, 17, "P" ],
Actual result:
[ 15,
R, 2, "", A, 3, "F", B, 4, "", C, 5, "FS", D, 6, "", E, 7, "T", F, 8, "", O, 9, "T", G, 11, "F", H, 12, "FT", J, 14, "T", K, 15, "P" ],
[ 15,
S, 2, "", A, 3, "", B, 4, "F", C, 5, "F", D, 6, "", E, 7, "", F, 8, "T", O, 9, "T", Q, 10, "T", H, 12, "", I, 13, "", L, 14, "T", M, 15, "" ],
[ 13, 0, 13, 0,
1, 1, "", 3, 3, "", 4, 4, "", 5, 5, "", 6, 6, "", 7, 7, "", 8, 8, "", 9, 9, "T", 10, 10, "T", 11, 11, "", 12, 12, "", 13, 13, "" ],
Debug output:
*** error closing mbsync: Bad file descriptor
=> ERROR: isync-1.5.1_1: do_check: 'perl src/run-tests.pl' exited with 1
Am I missing something?
Thanks.
make checkdoes indeed run only the unit tests, while the integration test needs to be run manually. this has historical reasons, but given how slow the latter is, i am hesitant to change things.the test expects to be run from within the src directory with
./run-tests.pl.Thanks a lot. If I cd src first, then all tests pass indeed.