Feature #1809
closedlibosmocore: timer test fails sporadically
100%
Description
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.
e.g. https://jenkins.osmocom.org/jenkins/job/libosmocore-gerrit/label=FreeBSD_amd64/153/console
https://jenkins.osmocom.org/jenkins/job/libosmocore-gerrit/154/
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.
Updated by neels over 7 years ago
The libosmocore bssgp-fc test is also based on realtime,
and has also caused false build failures.
Updated by neels over 7 years ago
- Checklist item timer test added
- Checklist item bssgp-fc test added
Updated by neels over 7 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.
Updated by neels over 7 years ago
recently had another case of the bssgp-fc test failing on the freebsd build slave.
It happens very scarcely, so the need to finish this is not very pressing.
Updated by neels about 7 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)
Updated by neels about 7 years ago
- Priority changed from Low to High
hmm, the bssgp-fc does fail quite often on the FreeBSD build slave, lately.
Updated by neels about 7 years ago
- Checklist item bssgp-fc test set to Done
- Status changed from New to In Progress
- % Done changed from 70 to 100
https://gerrit.osmocom.org/1760
waiting for patch to be merged before closing the issue
Updated by neels about 7 years ago
- Status changed from In Progress to Resolved
merged as libosmocore 7132011afa1741f8cc435250a6981a4f6919f396