Project

General

Profile

Actions

Feature #1809

closed

libosmocore: timer test fails sporadically

Added by neels over 7 years ago. Updated about 7 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
Actions #1

Updated by neels over 7 years ago

  • Description updated (diff)
Actions #2

Updated by neels over 7 years ago

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

Actions #3

Updated by neels over 7 years ago

  • Checklist item timer test added
  • Checklist item bssgp-fc test added
Actions #4

Updated by laforge over 7 years ago

  • Assignee set to 28
Actions #5

Updated by laforge over 7 years ago

  • Assignee changed from 28 to neels
Actions #6

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.

Actions #7

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.

Actions #8

Updated by neels over 7 years ago

  • Priority changed from Normal to Low
Actions #9

Updated by neels over 7 years ago

  • Status changed from In Progress to New
Actions #10

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

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.

Actions #12

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

Actions #13

Updated by neels about 7 years ago

  • Status changed from In Progress to Resolved
Actions #14

Updated by neels about 7 years ago

  • Status changed from Resolved to Closed
Actions #15

Updated by neels about 7 years ago

  • Status changed from Closed to Resolved
Actions #16

Updated by laforge about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)