diff mbox series

[bug#48850] gnu: coreutils: Disable inotify-dir-recreate test

Message ID 20210605152645.2562795-1-contact@carldong.me
State Accepted
Headers show
Series [bug#48850] gnu: coreutils: Disable inotify-dir-recreate test | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Carl Dong June 5, 2021, 3:26 p.m. UTC
This test fails on filesystems where tail detects that it cannot use
inotify safely. See #47935 for more details.

* gnu/packages/base.scm (coreutils)[phases]: Disable
  inotify-dir-recreate tests.
---
 gnu/packages/base.scm | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Comments

Ludovic Courtès June 5, 2021, 8:18 p.m. UTC | #1
Hi,

Carl Dong <contact@carldong.me> skribis:

> This test fails on filesystems where tail detects that it cannot use
> inotify safely. See #47935 for more details.
>
> * gnu/packages/base.scm (coreutils)[phases]: Disable
>   inotify-dir-recreate tests.

Please write the full bug URL in the commit log and comment; it’s less
ambiguous, more future-proof, and more convenient.

> -                 ,@(if (hurd-target?)
> -                       `((add-after 'unpack 'remove-tests
> -                           (lambda _
> -                             (substitute* "Makefile.in"
> -                               ;; this test hangs
> -                               (("^ *tests/misc/timeout-group.sh.*") "")))))
> -                       '()))))
> +                 (add-after 'unpack 'remove-tests
> +                   (lambda _
> +                     (if ,(hurd-target?)
> +                         (substitute* "Makefile.in"
> +                           ;; this test hangs
> +                           (("^ *tests/misc/timeout-group.sh.*") "")))

I’d write it like this:

  (lambda _
    ,@(if (hurd-target?)
          '((substitute* …))
          '())

    …)

That way, the Hurd bit is only expanded when targeting the Hurd, and we
can also adjust it without causing rebuilds on GNU/Linux.

As far as I’m concerned, it’s OK for ‘core-updates’ with these changes!

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index d30299a7b6..02ac619fac 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -378,13 +378,16 @@  used to apply commands with arbitrarily long arguments.")
                        (("/bin/sh") (which "sh")))
                      (substitute* (find-files "tests" "\\.sh$")
                        (("#!/bin/sh") (string-append "#!" (which "sh"))))))
-                 ,@(if (hurd-target?)
-                       `((add-after 'unpack 'remove-tests
-                           (lambda _
-                             (substitute* "Makefile.in"
-                               ;; this test hangs
-                               (("^ *tests/misc/timeout-group.sh.*") "")))))
-                       '()))))
+                 (add-after 'unpack 'remove-tests
+                   (lambda _
+                     (if ,(hurd-target?)
+                         (substitute* "Makefile.in"
+                           ;; this test hangs
+                           (("^ *tests/misc/timeout-group.sh.*") "")))
+                     (substitute* "Makefile.in"
+                       ;; fails on filesystems where inotify cannot be used,
+                       ;; more info in #47935
+                       (("^ *tests/tail-2/inotify-dir-recreate.sh.*") "")))))))
    (synopsis "Core GNU utilities (file, text, shell)")
    (description
     "GNU Coreutils package includes all of the basic command-line tools that