Project

General

Profile

Feature #1809

libosmocore: timer test fails sporadically

Added by neels over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Start date:
08/31/2016
Due date:
% Done:

100%

Spec Reference:

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.


Checklist

  • timer test
  • bssgp-fc test

History

#1 Updated by neels over 4 years ago

  • Description updated (diff)

#2 Updated by neels over 4 years ago

The libosmocore bssgp-fc test is also based on realtime,
and has also caused false build failures.

#3 Updated by neels over 4 years ago

  • Checklist item timer test added
  • Checklist item bssgp-fc test added

#4 Updated by laforge over 4 years ago

  • Assignee set to shoragan

#5 Updated by laforge over 4 years ago

  • Assignee changed from shoragan to neels

#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.

#7 Updated by neels over 4 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.

#8 Updated by neels about 4 years ago

  • Priority changed from Normal to Low

#9 Updated by neels about 4 years ago

  • Status changed from In Progress to New

#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)

#11 Updated by neels about 4 years ago

  • Priority changed from Low to High

hmm, the bssgp-fc does fail quite often on the FreeBSD build slave, lately.

#12 Updated by neels almost 4 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

#13 Updated by neels almost 4 years ago

  • Status changed from In Progress to Resolved

#14 Updated by neels almost 4 years ago

  • Status changed from Resolved to Closed

#15 Updated by neels almost 4 years ago

  • Status changed from Closed to Resolved

#16 Updated by laforge almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)