unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon South <simon@simonsouth.net>
To: 50346@debbugs.gnu.org
Subject: bug#50346: [PATCH core-updates-frozen] gnu: strace: Allow readlink, readlinkat tests to pass.
Date: Sat,  4 Sep 2021 15:58:21 -0400	[thread overview]
Message-ID: <20210904195821.14743-1-simon@simonsouth.net> (raw)
In-Reply-To: <875yvi93w8.fsf@simonsouth.net>

Modify the invocation of strace's "readlink" and "readlinkat" tests to prevent
them from failing due to an additional system call made by Guix's patched
version of glibc.

* gnu/packages/linux.scm (strace)[source]: Add patch.
[arguments]<#:phases>: Do not disable the "readlink" test now that it can
succeed.
* gnu/packages/patches/strace-fix-readlink-readlinkat-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/linux.scm                        |  8 ++--
 ...strace-fix-readlink-readlinkat-tests.patch | 46 +++++++++++++++++++
 3 files changed, 50 insertions(+), 5 deletions(-)
 create mode 100644 gnu/packages/patches/strace-fix-readlink-readlinkat-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index bb22e29caa..f9c8956568 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1547,6 +1547,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/sdl-pango-sans-serif.patch		\
   %D%/packages/patches/smalltalk-multiplication-overflow.patch	\
   %D%/packages/patches/sqlite-hurd.patch			\
+  %D%/packages/patches/strace-fix-readlink-readlinkat-tests.patch	\
   %D%/packages/patches/sunxi-tools-remove-sys-io.patch	\
   %D%/packages/patches/patchutils-test-perms.patch		\
   %D%/packages/patches/patch-hurd-path-max.patch		\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 63f0e4108c..99b7ce7066 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2240,7 +2240,9 @@ Zerofree requires the file system to be unmounted or mounted read-only.")
                                  "/strace-" version ".tar.xz"))
              (sha256
               (base32
-               "0mmns22bjjvakxj29si0x4dcylcgy26llpcimkb0llcxif439k2s"))))
+               "0mmns22bjjvakxj29si0x4dcylcgy26llpcimkb0llcxif439k2s"))
+             (patches
+              (search-patches "strace-fix-readlink-readlinkat-tests.patch"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -2253,10 +2255,6 @@ Zerofree requires the file system to be unmounted or mounted read-only.")
          (add-after 'unpack 'disable-failing-tests
            (lambda _
              (substitute* "tests/Makefile.in"
-               ;; XXX: This test fails because an extra readlink call is made
-               ;; by the glibc when using the ld.so cache.
-               (("readlink.gen.test[^:]") " ")
-
                ;; XXX: These hang forever even if the test time-out is
                ;; extended.
                (("^\tstrace-DD?D?\\.test \\\\.*") "")
diff --git a/gnu/packages/patches/strace-fix-readlink-readlinkat-tests.patch b/gnu/packages/patches/strace-fix-readlink-readlinkat-tests.patch
new file mode 100644
index 0000000000..dd5ee98703
--- /dev/null
+++ b/gnu/packages/patches/strace-fix-readlink-readlinkat-tests.patch
@@ -0,0 +1,46 @@
+Prevent strace's "readlink" and "readlinkat" tests from failing due to the
+additional system call made by glibc with the patch "glibc-dl-cache.patch"
+applied (introduced in commit 52564e9).
+
+These changes cause strace to report during these tests only system calls on
+files contained in the test directory, effectively filtering out the
+additional readlink/readlinkat call on "/proc/self/exe" and allowing the tests
+to complete as normal.
+
+diff --git a/tests/gen_tests.in b/tests/gen_tests.in
+index 8b4e2e9..cc3ca63 100644
+--- a/tests/gen_tests.in
++++ b/tests/gen_tests.in
+@@ -623,8 +623,8 @@ quotactl-xfs-v	-v -e trace=quotactl
+ read-write	-a15 -eread=0,5 -ewrite=1,4 -e trace=read,write -P read-write-tmpfile -P /dev/zero -P /dev/null
+ readahead	-a1
+ readdir	-a16
+-readlink	-xx
+-readlinkat	-xx
++readlink	-xx --trace-path=test.readlink.link
++readlinkat	-xx --trace-path=test.readlinkat.link
+ reboot		-s 256
+ recv-MSG_TRUNC	-a26 -e trace=recv
+ recvfrom	-a35
+diff --git a/tests/readlink.gen.test b/tests/readlink.gen.test
+index 4263234..418691b 100755
+--- a/tests/readlink.gen.test
++++ b/tests/readlink.gen.test
+@@ -1,4 +1,4 @@
+ #!/bin/sh -efu
+-# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlink -xx ); do not edit.
++# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlink -xx --trace-path=test.readlink.link); do not edit.
+ . "${srcdir=.}/init.sh"
+-run_strace_match_diff -xx 
++run_strace_match_diff -xx --trace-path=test.readlink.link
+diff --git a/tests/readlinkat.gen.test b/tests/readlinkat.gen.test
+index d7de993..a48d590 100755
+--- a/tests/readlinkat.gen.test
++++ b/tests/readlinkat.gen.test
+@@ -1,4 +1,4 @@
+ #!/bin/sh -efu
+-# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlinkat -xx ); do not edit.
++# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlinkat -xx --trace-path=test.readlinkat.link); do not edit.
+ . "${srcdir=.}/init.sh"
+-run_strace_match_diff -xx 
++run_strace_match_diff -xx --trace-path=test.readlinkat.link
-- 
2.25.2





  parent reply	other threads:[~2021-09-04 20:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 19:24 bug#50346: core-updates-frozen: strace 5.13 fails "make check" on AArch64 Simon South
2021-09-02 22:41 ` Simon South
2021-09-03 12:15   ` Bengt Richter
2021-09-03 14:00     ` Simon South
2021-09-03 16:53       ` Bengt Richter
2021-09-03 21:27         ` Simon South
2021-09-04 19:51           ` Simon South
2021-09-04 19:58 ` Simon South [this message]
2021-11-18 13:13   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210904195821.14743-1-simon@simonsouth.net \
    --to=simon@simonsouth.net \
    --cc=50346@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).