[PATCH] gnu: coreutils: Disable inotify-dir-recreate test

  • Done
  • quality assurance status badge
Details
2 participants
  • Carl Dong
  • Ludovic Courtès
Owner
unassigned
Submitted by
Carl Dong
Severity
normal
C
C
Carl Dong wrote on 5 Jun 2021 17:26
(address . guix-patches@gnu.org)(name . Carl Dong)(address . contact@carldong.me)
20210605152645.2562795-1-contact@carldong.me
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(-)

Toggle diff (30 lines)
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
--
2.31.1
L
L
Ludovic Courtès wrote on 5 Jun 2021 22:18
(name . Carl Dong)(address . contact@carldong.me)(address . 48850@debbugs.gnu.org)
878s3onjzl.fsf@gnu.org
Hi,

Carl Dong <contact@carldong.me> skribis:

Toggle quote (6 lines)
> 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.

Toggle quote (14 lines)
> - ,@(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’.
C
C
Carl Dong wrote on 7 Jun 2021 23:50
[PATCH v2] gnu: coreutils: Disable inotify-dir-recreate test
(address . ludo@gnu.org)
20210607215058.3989424-1-contact@carldong.me
Toggle quote (9 lines)
> I’d write it like this:
>
> (lambda _
> ,@(if (hurd-target?)
> '((substitute* …))
> '())
>
> …)

I'm not entirely familiar with the quoting here, but I trust that this is
correct... Does the following patch look okay?

---

This test fails on filesystems where tail detects that it cannot use
inotify safely. See https://issues.guix.gnu.org/47935for more details.

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

Toggle diff (31 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index d30299a7b6..1ab50dfaf9 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -378,13 +378,17 @@ 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
--
2.31.1
C
C
Carl Dong wrote on 8 Jun 2021 20:38
[PATCH v3] gnu: coreutils: Disable inotify-dir-recreate test
(address . ludo@gnu.org)
20210608183814.3099881-1-contact@carldong.me
Fixed my quoting thanks to mbakke :-)

---

This test fails on filesystems where tail detects that it cannot use
inotify safely. See https://issues.guix.gnu.org/47935for more details.

* gnu/packages/base.scm (coreutils)[phases]: Disable
inotify-dir-recreate tests, quote Hurd substitute* call to reduce
rebuilds.
---
gnu/packages/base.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index d30299a7b6..edc4c4a427 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -378,13 +378,17 @@ 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"
+ (add-after 'unpack 'remove-tests
+ (lambda _
+ ,@(if (hurd-target?)
+ '((substitute* "Makefile.in"
;; this test hangs
- (("^ *tests/misc/timeout-group.sh.*") "")))))
- '()))))
+ (("^ *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
--
2.31.1
L
L
Ludovic Courtès wrote on 11 Jun 2021 15:56
(name . Carl Dong)(address . contact@carldong.me)(address . 48850@debbugs.gnu.org)
87lf7g8pyf.fsf@gnu.org
Hi Carl,

Carl Dong <contact@carldong.me> skribis:

Toggle quote (11 lines)
> Fixed my quoting thanks to mbakke :-)
>
> ---
>
> This test fails on filesystems where tail detects that it cannot use
> inotify safely. See https://issues.guix.gnu.org/47935 for more details.
>
> * gnu/packages/base.scm (coreutils)[phases]: Disable
> inotify-dir-recreate tests, quote Hurd substitute* call to reduce
> rebuilds.

LGTM and OK for ‘core-updates’, thanks!

Ludo’.
C
C
Carl Dong wrote on 11 Jun 2021 22:39
Closing 48850
(address . control@debbugs.gnu.org)
145AC086-EF2E-4C83-86AC-5C0C3038DC64@carldong.me
close 48850 6ba1058df0c4ce5611c2367531ae5c3cdc729ab4
?