[MERGED] libosmocore[master]: bssgp_fc_test: remove rounding to deciseconds

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Nov 20 16:23:11 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: bssgp_fc_test: remove rounding to deciseconds
......................................................................


bssgp_fc_test: remove rounding to deciseconds

Ever since this test was changed to use osmo_gettimeofday_override, the times
it sees are exact every time and don't need rounding to pass the expected
output.

Change-Id: I4a9a5d31fc02eb55caf7ba9c141426d8115bb740
---
M tests/gb/bssgp_fc_test.c
1 file changed, 0 insertions(+), 10 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved



diff --git a/tests/gb/bssgp_fc_test.c b/tests/gb/bssgp_fc_test.c
index 27d8fcc..4719872 100644
--- a/tests/gb/bssgp_fc_test.c
+++ b/tests/gb/bssgp_fc_test.c
@@ -29,19 +29,10 @@
 	return tv.tv_sec * 100 + tv.tv_usec/10000;
 }
 
-/* round to deciseconds to make sure test output is always consistent */
-int round_decisec(int csec_in)
-{
-	int tmp = csec_in / 10;
-
-	return tmp * 10;
-}
-
 static int fc_out_cb(struct bssgp_flow_control *fc, struct msgb *msg,
 		     uint32_t llc_pdu_len, void *priv)
 {
 	unsigned int csecs = get_centisec_diff();
-	csecs = round_decisec(csecs);
 
 	printf("%u: FC OUT Nr %lu\n", csecs, (unsigned long) msg->cb[0]);
 	msgb_free(msg);
@@ -52,7 +43,6 @@
 {
 	struct msgb *msg;
 	unsigned int csecs = get_centisec_diff();
-	csecs = round_decisec(csecs);
 
 	msg = msgb_alloc(1, "fc test");
 	msg->cb[0] = in_ctr++;

-- 
To view, visit https://gerrit.osmocom.org/4869
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a9a5d31fc02eb55caf7ba9c141426d8115bb740
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list