diff mbox series

[bug#49933,core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test

Message ID cc327a48ae0b6e2a2570f923b428d4dbd5eeb7cc.camel@telenet.be
State Accepted
Headers show
Series [bug#49933,core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test | expand

Checks

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

Commit Message

M Aug. 7, 2021, 9:54 p.m. UTC
In <https://issues.guix.gnu.org/XXXXX>, XXXXX will need
to be replaced with the debbugs id.

Comments

Thiago Jung Bauermann Aug. 8, 2021, 6:27 a.m. UTC | #1
Hello Maxime,

Em sábado, 7 de agosto de 2021, às 18:54:50 -03, Maxime Devos escreveu:
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index a5fd8ddaee..c964602e63 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -1804,6 +1804,14 @@ providing the system administrator with some help in common tasks.")
>                           (string-append
>                            all "\n"
>                            "ts_skip \"setarch tests are unreliable under QEMU\"")))))
> +                  (add-before 'check 'disable-lsns-test
> +                    (lambda _
> +                      ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
> +                      ;; returning ENOTTY, indicating this kernel does not
> +                      ;; support user namespaces.  Curiously, this test can fail
> +                      ;; on i686 even if the same test passes on x86_64 on the
> +                      ;; same machine.  See <https://issues.guix.gnu.org/XXXXX>.
> +                      (delete-file "tests/ts/lsns/ioctl_ns")))
>                    (add-after 'install 'move-static-libraries
>                      (lambda* (#:key outputs #:allow-other-keys)
>                        (let ((lib    (assoc-ref outputs "lib"))

Thanks! I can confirm this behavior also happens on my machine, running
Guix on a foreign distro (Ubuntu, with kernel 5.11.0-25-generic). I ran
into the problem while trying to build ‘bootstrap-tarballs’, and with
your patch it works.

Just one suggestion: what about only deleting the problematic test if
‘%current-system’ is "i686-linux"?
Brendan Tildesley Nov. 9, 2021, 9:07 a.m. UTC | #2
I just got this test failure on x86_64 (AMD 5800X):

lsns: ownership and hierarchy                                  ... FAILED (lsns/ioctl_ns)

Maybe the test needs to be disabled completely. It only happened once thoughout of ~10 --check's. Has the issue been reported upstream?


Also, the tests used all 16 threads despite it running make test -c 8, but it guess thats unrelated.
Thiago Jung Bauermann Nov. 12, 2021, 12:29 a.m. UTC | #3
Hello Brendan,

Em terça-feira, 9 de novembro de 2021, às 06:07:52 -03, Brendan Tildesley escreveu:
> I just got this test failure on x86_64 (AMD 5800X):
> 
> lsns: ownership and hierarchy                                  ... FAILED
> (lsns/ioctl_ns)
> 
> Maybe the test needs to be disabled completely.

It was, on the core-updates-frozen branch. When it is merged to master, then you won’t 
run the test anymore even on x86_64-linux.

> It only happened once thoughout of ~10 --check's. Has the issue been
> reported upstream?

I wasn’t aware that the test failed intermitently. That’s unfortunate. From a quick search 
online, I’m not seeing any report of this problem.

One thing which I did find was this recent change to the ioctl_ns test:

https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?
id=597ccb7bf564f65bb059bfe420224cab0fba46ac[1]

Apparently it doesn’t work when run inside a namespace.

> Also, the tests used all 16 threads despite it running make test -c 8,
> but it guess thats unrelated.

I agree, that would be a separate issue.
diff mbox series

Patch

From dae891f54d4ace4ab467d547f1c91cf003f47051 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 7 Aug 2021 23:41:10 +0200
Subject: [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable
 ioctl_ns test.
To: guix-patches@gnu.org

* gnu/packages/linux.scm
  (util-linux)[arguments]<#:phases>{delete-lsns-test}: New phase.
---
 gnu/packages/linux.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a5fd8ddaee..c964602e63 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1804,6 +1804,14 @@  providing the system administrator with some help in common tasks.")
                          (string-append
                           all "\n"
                           "ts_skip \"setarch tests are unreliable under QEMU\"")))))
+                  (add-before 'check 'disable-lsns-test
+                    (lambda _
+                      ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
+                      ;; returning ENOTTY, indicating this kernel does not
+                      ;; support user namespaces.  Curiously, this test can fail
+                      ;; on i686 even if the same test passes on x86_64 on the
+                      ;; same machine.  See <https://issues.guix.gnu.org/XXXXX>.
+                      (delete-file "tests/ts/lsns/ioctl_ns")))
                   (add-after 'install 'move-static-libraries
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let ((lib    (assoc-ref outputs "lib"))

base-commit: 944ba4237f4c0ccab1bc62a23a31f577ce1878e5
-- 
2.32.0