libosmocore: timer test fails sporadically
The 'timer' test in libosmocore is based on real time,
meaning that it occasionally fails just because of server load.
This causes gerrit patches to be rejected and requires manual retriggering.
It would be nice to wrap the gettimeofday calls in some shim that could
be redirected to an artificial timing source for the unit test(s), so that
no real time is involved and the test works regardless of load.
tested the same and succeeded.
Another improvement would be that the test would take less time to complete,
not having to wait for real time to pass.
- timer test
- bssgp-fc test
#6 Updated by neels over 4 years ago
- Checklist item timer test set to Done
- Status changed from New to In Progress
- % Done changed from 0 to 70
timer_test had a time calculation bug fixed in
commit 633a0e76a2fbb31ce6dd4dadb35313aed3aa385c CommitDate: Thu Sep 22 07:18:39 2016 +0200 fix timer_test: don't forget to set tv_usec on the stop time
Also, timer_test is now on fake time
commit 7b4d727ec5debc3d057686a0a3f0f5f14260a282 CommitDate: Thu Sep 22 07:18:39 2016 +0200 timer_test: do not use real time: deterministic and faster
With osmo_gettimeofday added in 8e2f7e87f4d, any other tests can be taken off real time.
#10 Updated by neels about 4 years ago
recently saw another bssgp-fc failure on the FreeBSD slave:
======================== ./libosmocore-0.9.6.55-1251/_build/tests/testsuite.dir/30/testsuite.log # -*- compilation -*- 30. testsuite.at:186: testing bssgp-fc ... ../../tests/testsuite.at:190: $abs_top_srcdir/tests/gb/bssgp_fc_tests.sh $abs_top_builddir/tests/gb --- expout 2017-01-12 11:44:58.106234000 +0000 +++ /usr/home/osmocom-build/source/workspace/libosmocore/label/FreeBSD_amd64/libosmocore-0.9.6.55-1251/_build/tests/testsuite.dir/at-groups/30/stdout 2017-01-12 11:45:00.584154000 +0000 @@ -80,7 +80,7 @@ 70: FC OUT Nr 17 80: FC OUT Nr 18 90: FC OUT Nr 19 -100: FC OUT Nr 20 +110: FC OUT Nr 20 ===== BSSGP flow-control test END ===== BSSGP flow-control test START 30. testsuite.at:186: 30. bssgp-fc (testsuite.at:186): FAILED (testsuite.at:190)