summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-08-05 19:36:59 +0200
committerMark H Weaver <mhw@netris.org>2019-08-06 02:17:38 -0400
commit2426e2c94cdf9fcf28bba28b1e84b1aa5f652332 (patch)
treedcd24a1c810c823ac8a9da4c19df4ef17c9a7594 /gnu/packages
parent96681d4be101c771fafd4257aca471685119fedd (diff)
downloadguix-2426e2c94cdf9fcf28bba28b1e84b1aa5f652332.tar.gz
gnu: strace: Fix test failures on some systems.
* gnu/packages/patches/strace-ipc-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/linux.scm (strace)[source](patches): New field.
[arguments]: Add 'regenerate-tests' phase.

Co-Authored-By: Mark H Weaver <mhw@netris.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/linux.scm12
-rw-r--r--gnu/packages/patches/strace-ipc-tests.patch30
2 files changed, 41 insertions, 1 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 44526e3786..9f20d2bace 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1408,6 +1408,9 @@ Zerofree requires the file system to be unmounted or mounted read-only.")
              (method url-fetch)
              (uri (string-append home-page "/files/" version
                                  "/strace-" version ".tar.xz"))
+             ;; XXX Remove the 'regenerate-tests' phase below when
+             ;; "strace-ipc-tests.patch" is no longer applied.
+             (patches (search-patches "strace-ipc-tests.patch"))
              (sha256
               (base32
                "1li49i75wrdw91hchyyd8spnzfcmxcfyfb5g9zbaza89aq4bq4ym"))))
@@ -1419,7 +1422,14 @@ Zerofree requires the file system to be unmounted or mounted read-only.")
            (lambda _
              (substitute* "strace.c"
                (("/bin/sh") (which "sh")))
-             #t)))
+             #t))
+         (add-before 'configure 'regenerate-tests
+           ;; XXX Remove this phase when "strace-ipc-tests.patch" is no longer
+           ;; applied in the 'source' field above.  This phase is needed to
+           ;; regenerate many other files from tests/gen_tests.in, which is
+           ;; modified by the aforementioned patch.
+           (lambda _
+             (invoke "tests/gen_tests.sh"))))
        ;; Don't fail if the architecture doesn't support different personalities.
        #:configure-flags '("--enable-mpers=check")
        ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
diff --git a/gnu/packages/patches/strace-ipc-tests.patch b/gnu/packages/patches/strace-ipc-tests.patch
new file mode 100644
index 0000000000..49341765ca
--- /dev/null
+++ b/gnu/packages/patches/strace-ipc-tests.patch
@@ -0,0 +1,30 @@
+Fix a test failure on some systems.
+
+Taken from upstream:
+https://github.com/strace/strace/commit/4377e3a1535a0ec3a42da8a1366ad6943f4efa0e
+
+diff --git a/tests/gen_tests.in b/tests/gen_tests.in
+index 4a506b94c..4fdf4722c 100644
+--- a/tests/gen_tests.in
++++ b/tests/gen_tests.in
+@@ -168,16 +168,16 @@ ipc_msg-Xabbrev	+ipc.sh -Xabbrev -a26
+ ipc_msg-Xraw	+ipc.sh -Xraw -a16
+ ipc_msg-Xverbose	+ipc.sh -Xverbose -a34
+ ipc_msgbuf-Xabbrev	+ipc_msgbuf.test -Xabbrev
+-ipc_msgbuf-Xraw	+ipc_msgbuf.test -Xraw -a22
++ipc_msgbuf-Xraw	+ipc_msgbuf.test -Xraw -a20
+ ipc_msgbuf-Xverbose	+ipc_msgbuf.test -Xverbose
+ ipc_sem	+ipc.sh -a29
+ ipc_sem-Xabbrev	+ipc.sh -Xabbrev -a29
+ ipc_sem-Xraw	+ipc.sh -Xraw -a19
+ ipc_sem-Xverbose	+ipc.sh -Xverbose -a36
+-ipc_shm	+ipc.sh -a29
+-ipc_shm-Xabbrev	+ipc.sh -Xabbrev -a29
++ipc_shm	+ipc.sh -a26
++ipc_shm-Xabbrev	+ipc.sh -Xabbrev -a26
+ ipc_shm-Xraw	+ipc.sh -Xraw -a19
+-ipc_shm-Xverbose	+ipc.sh -Xverbose -a36
++ipc_shm-Xverbose	+ipc.sh -Xverbose -a34
+ kcmp	-a22
+ kcmp-y	-a22 -y -e trace=kcmp
+ kern_features -a16