[Debian-mobcom-maintainers] Bug#1065790: libosmo-netif: FTBFS on arm{el, hf}: tests fail
Steve Langasek
steve.langasek at ubuntu.com
Sat Apr 13 21:35:35 BST 2024
Package: libosmo-netif
Followup-For: Bug #1065790
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch
Well, maybe a version of the patch without a stray character that breaks
compilation.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
diff -Nru libosmo-netif-1.2.0/debian/patches/64-bit-time-t.patch libosmo-netif-1.2.0/debian/patches/64-bit-time-t.patch
--- libosmo-netif-1.2.0/debian/patches/64-bit-time-t.patch 1969-12-31 16:00:00.000000000 -0800
+++ libosmo-netif-1.2.0/debian/patches/64-bit-time-t.patch 2024-04-13 12:31:32.000000000 -0700
@@ -0,0 +1,136 @@
+Description: use a 64-bit safe format string for time_t.
+Author: Steve Langasek <steve.langasek at canonical.com>
+Bug-Debian: https://bugs.debian.org/1065790
+Last-Update: 2024-04-13
+Forwarded: no
+
+Index: libosmo-netif-1.2.0/examples/ipa-stream-client.c
+===================================================================
+--- libosmo-netif-1.2.0.orig/examples/ipa-stream-client.c
++++ libosmo-netif-1.2.0/examples/ipa-stream-client.c
+@@ -143,7 +143,8 @@
+ timersub(&tv, &found->tv, &diff);
+
+ LOGP(DLINP, LOGL_NOTICE, "message %d replied "
+- "in %lu.%.6lu\n", num, diff.tv_sec, diff.tv_usec);
++ "in %lld.%.6lld\n", num, (long long int)diff.tv_sec,
++ (long long int)diff.tv_usec);
+ talloc_free(found);
+ } else {
+ LOGP(DLINP, LOGL_ERROR,
+Index: libosmo-netif-1.2.0/src/jibuf.c
+===================================================================
+--- libosmo-netif-1.2.0.orig/src/jibuf.c
++++ libosmo-netif-1.2.0/src/jibuf.c
+@@ -385,10 +385,10 @@
+ timeradd(&jb->last_enqueue_time, &delay_ts, &sched_ts);
+
+ LOGP(DLJIBUF, LOGL_DEBUG, "enqueuing packet seq=%"PRIu16" rel=%d delay=%d" \
+- " skew=%d thres=%d {%lu.%06lu -> %lu.%06lu} %s\n",
++ " skew=%d thres=%d {%lld.%06lld -> %lld.%06lld} %s\n",
+ msg_get_sequence(msg), rel_delay, delay, jb->skew_us, jb->threshold_delay,
+- jb->last_enqueue_time.tv_sec, jb->last_enqueue_time.tv_usec,
+- sched_ts.tv_sec, sched_ts.tv_usec, msg_get_marker(msg)? "M" : "");
++ (long long int)jb->last_enqueue_time.tv_sec, (long long int)jb->last_enqueue_time.tv_usec,
++ (long long int)sched_ts.tv_sec, (long long int)sched_ts.tv_usec, msg_get_marker(msg)? "M" : "");
+
+ /* Add scheduled dequeue time in msg->cb so we can check it later */
+ unsigned long *old_cb = talloc_memdup(jb->talloc_ctx, msg->cb, sizeof(msg->cb));
+Index: libosmo-netif-1.2.0/tests/osmux/osmux_test.c
+===================================================================
+--- libosmo-netif-1.2.0.orig/tests/osmux/osmux_test.c
++++ libosmo-netif-1.2.0/tests/osmux/osmux_test.c
+@@ -69,8 +69,10 @@
+ struct timeval tv; \
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \
+ osmo_gettimeofday(&tv, NULL); \
+- fprintf(stderr, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt, \
+- tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \
++ fprintf(stderr, "sys={%lld.%06lld}, mono={%lld.%06lld}: " fmt, \
++ (long long int)tv.tv_sec, (long long int)tv.tv_usec, \
++ (long long int)ts.tv_sec, \
++ (long long int)ts.tv_nsec/1000, ##args); \
+ } while(0)
+
+ static void clock_override_enable(bool enable)
+Index: libosmo-netif-1.2.0/tests/stream/stream_test.c
+===================================================================
+--- libosmo-netif-1.2.0.orig/tests/stream/stream_test.c
++++ libosmo-netif-1.2.0/tests/stream/stream_test.c
+@@ -60,7 +60,7 @@
+ #define LOGCLI(cli, fmt, args...) do { \
+ struct timeval tv; \
+ osmo_gettimeofday(&tv, NULL); \
+- printf("{%lu.%06lu} [%s] Client's %s(): " fmt, tv.tv_sec, tv.tv_usec, \
++ printf("{%lld.%06lld} [%s] Client's %s(): " fmt, (long long int)tv.tv_sec, (long long int)tv.tv_usec, \
+ osmo_stream_cli_get_data(cli) ? "OK" : "NA", __func__, ##args); \
+ } while (0)
+
+@@ -235,7 +235,7 @@
+ #define LOGSRV(srv, fmt, args...) do { \
+ struct timeval tv; \
+ osmo_gettimeofday(&tv, NULL); \
+- printf("{%lu.%06lu} [%s|%s] Server's %s(): " fmt, tv.tv_sec, tv.tv_usec, \
++ printf("{%lld.%06lld} [%s|%s] Server's %s(): " fmt, (long long int)tv.tv_sec, (long long int)tv.tv_usec, \
+ osmo_stream_srv_get_data(srv) ? "OK" : "NA", \
+ osmo_stream_srv_link_get_data(osmo_stream_srv_get_master(srv)) ? "OK" : "NA", \
+ __func__, ##args); \
+@@ -346,21 +346,21 @@
+ osmo_gettimeofday_override_add(0, 1); /* small increment to easily spot iterations */
+ osmo_select_main(0);
+ osmo_gettimeofday(&tv, NULL);
+- fprintf(stderr, "\n{%lu.%06lu} %s test step %u [client %s, server %s], FD reg %u\n",
+- tv.tv_sec, tv.tv_usec, ASTR(autoreconnect), steps,
++ fprintf(stderr, "\n{%lld.%06lld} %s test step %u [client %s, server %s], FD reg %u\n",
++ (long long int)tv.tv_sec, (long long int)tv.tv_usec, ASTR(autoreconnect), steps,
+ osmo_stream_cli_get_data(cli) ? "OK" : "NA",
+ osmo_stream_srv_link_get_data(lnk) ? "OK" : "NA",
+ osmo_fd_is_registered(osmo_stream_cli_get_ofd(cli)));
+
+ if (test_stop_requested(lnk)) {
+- printf("{%lu.%06lu} Server requested test termination\n",
+- tv.tv_sec, tv.tv_usec);
++ printf("{%lld.%06lld} Server requested test termination\n",
++ (long long int)tv.tv_sec, (long long int)tv.tv_usec);
+ steps = 0;
+ }
+ }
+
+ osmo_stream_cli_destroy(cli);
+- printf("{%lu.%06lu} %s test complete.\n\n", tv.tv_sec, tv.tv_usec, ASTR(autoreconnect));
++ printf("{%lld.%06lld} %s test complete.\n\n", (long long int)tv.tv_sec, (long long int)tv.tv_usec, ASTR(autoreconnect));
+ }
+
+
+Index: libosmo-netif-1.2.0/tests/jibuf/jibuf_test.c
+===================================================================
+--- libosmo-netif-1.2.0.orig/tests/jibuf/jibuf_test.c
++++ libosmo-netif-1.2.0/tests/jibuf/jibuf_test.c
+@@ -105,8 +105,9 @@
+ struct timeval tv;
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_gettimeofday(&tv, NULL);
+- printf("sys={%lu.%06lu}, mono={%lu.%06lu}: %s\n",
+- tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, str);
++ printf("sys={%lld.%06lld}, mono={%lld.%06lld}: %s\n",
++ (long long int)tv.tv_sec, (long long int)tv.tv_usec,
++ (long long int)ts.tv_sec, (long long int)ts.tv_nsec/1000, str);
+ }
+
+ static void clock_override_enable(bool enable)
+Index: libosmo-netif-1.2.0/tests/osmux/osmux_test2.c
+===================================================================
+--- libosmo-netif-1.2.0.orig/tests/osmux/osmux_test2.c
++++ libosmo-netif-1.2.0/tests/osmux/osmux_test2.c
+@@ -100,8 +100,9 @@
+ struct timeval tv;
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_gettimeofday(&tv, NULL);
+- printf("sys={%lu.%06lu}, mono={%lu.%06lu}: %s\n",
+- tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, str);
++ printf("sys={%lld.%06lld}, mono={%lld.%06lld}: %s\n",
++ (long long int)tv.tv_sec, (long long int)tv.tv_usec,
++ (long long int)ts.tv_sec, (long long int)ts.tv_nsec/1000, str);
+ }
+
+ static void clock_override_enable(bool enable)
diff -Nru libosmo-netif-1.2.0/debian/patches/series libosmo-netif-1.2.0/debian/patches/series
--- libosmo-netif-1.2.0/debian/patches/series 2022-10-13 10:02:35.000000000 -0700
+++ libosmo-netif-1.2.0/debian/patches/series 2024-04-13 12:07:27.000000000 -0700
@@ -1 +1,2 @@
Setting-library-version-explicitly.patch
+64-bit-time-t.patch
More information about the Debian-mobcom-maintainers
mailing list