Change in osmo-pcu[master]: tests/llc: Change unrealistic time jump to avoid runtime error under ARM

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

pespin gerrit-no-reply at lists.osmocom.org
Wed Mar 11 13:09:09 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17459 )

Change subject: tests/llc: Change unrealistic time jump to avoid runtime error under ARM
......................................................................

tests/llc: Change unrealistic time jump to avoid runtime error under ARM

When running the test under a RaspberryPI4:
+../../../src/llc.cpp:216:29: runtime error: signed integer overflow: 864197544 * 1000 cannot be represented in type 'long int'

864197544 comes from comparing initial insertion time and dequeue time
	  (test does a big jump in time): 987654321 - 123456777

let's use more realistic time changes, since the current one account for
about 37 years.

Change-Id: I28abc9192e0e7c590bc1c3c88950627cf669ffaf
---
M tests/llc/LlcTest.cpp
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/tests/llc/LlcTest.cpp b/tests/llc/LlcTest.cpp
index d6dd5fb..84164a0 100644
--- a/tests/llc/LlcTest.cpp
+++ b/tests/llc/LlcTest.cpp
@@ -150,9 +150,9 @@
 	osmo_gettimeofday_override_time = info1.recv_time;
 	enqueue_data(&queue, "LLC message 1", &info1.expire_time);
 
-	info2.recv_time.tv_sec = 987654321;
+	info2.recv_time.tv_sec = 123458000;
 	info2.recv_time.tv_usec = 547352;
-	info2.expire_time.tv_sec = 987654327;
+	info2.expire_time.tv_sec = 123458006;
 	info2.expire_time.tv_usec = 867252;
 	osmo_gettimeofday_override_time = info2.recv_time;
 	enqueue_data(&queue, "LLC message 2", &info2.expire_time);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17459
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I28abc9192e0e7c590bc1c3c88950627cf669ffaf
Gerrit-Change-Number: 17459
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200311/9d394081/attachment.htm>


More information about the gerrit-log mailing list