GNU bug report logs - #55866
[PATCH 0/2] Disable tests failing due to YAMA’s ptrace_scope.

Previous Next

Package: guix-patches;

Reported by: Lars-Dominik Braun <lars <at> 6xq.net>

Date: Thu, 9 Jun 2022 08:52:02 UTC

Severity: normal

Tags: patch

Done: Lars-Dominik Braun <lars <at> 6xq.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55866 in the body.
You can then email your comments to 55866 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#55866; Package guix-patches. (Thu, 09 Jun 2022 08:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars-Dominik Braun <lars <at> 6xq.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 09 Jun 2022 08:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] Disable tests failing due to YAMA’s ptrace_scope.
Date: Thu, 9 Jun 2022 10:51:10 +0200
Hi,

I noticed that some tests fail on my foreign distribution,
but not on Guix System, because they differ in their
/proc/sys/kernel/yama/ptrace_scope. Guix sets it to 0 (no limitations),
whereas most distributions default to 1 (only children can be ptrace’d),
causing a reproducibility issue. The following patches therefore disable
tests, which fail with a setting of >0.

Cheers,
Lars

Lars-Dominik Braun (2):
  gnu: python-pydevd: Skip tests failing due to YAMA.
  gnu: python-debugpy: Disable tests.

 gnu/packages/python-xyz.scm | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

-- 
2.35.1





Information forwarded to guix-patches <at> gnu.org:
bug#55866; Package guix-patches. (Thu, 09 Jun 2022 09:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 55866 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: 55866 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: python-pydevd: Skip tests failing due to YAMA.
Date: Thu, 9 Jun 2022 11:04:04 +0200
* gnu/packages/python-xyz.scm (python-pydevd)[arguments]: Add skipped
tests.
---
 gnu/packages/python-xyz.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5f9ce4fdfe..8de8d571e4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12351,7 +12351,10 @@ (define-public python-pydevd
                            ;; This test validates that 'pydevd' is not in the
                            ;; exception message, but it is due to being part
                            ;; of the build file name present in the message.
-                           "and not test_evaluate_exception_trace")))))
+                           "and not test_evaluate_exception_trace "
+                           ;; These fail on systems with YAMA LSM’s ptrace
+                           ;; scope > 0.
+                           "and not test_attach_to_pid")))))
             (add-after 'install 'install-attach-binary
               (lambda _
                 (install-file "attach.so"
-- 
2.35.1





Information forwarded to guix-patches <at> gnu.org:
bug#55866; Package guix-patches. (Thu, 09 Jun 2022 09:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 55866 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: 55866 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: python-debugpy: Disable tests.
Date: Thu, 9 Jun 2022 11:04:14 +0200
* gnu/packages/python-xyz.scm (python-debugpy)[arguments]: Respect
tests? in 'check phase and disable #:tests.
---
 gnu/packages/python-xyz.scm | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8de8d571e4..8e79ea01ae 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12399,6 +12399,7 @@ (define-public python-debugpy
     (build-system python-build-system)
     (arguments
      (list
+      #:tests? #f ; Fail on systems with YAMA LSM’s ptrace scope > 0.
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-sh-in-tests
@@ -12419,17 +12420,18 @@ (define-public python-debugpy
               (setenv "DEBUGPY_BUNDLING_DISABLED" "1")))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
-              (invoke "pytest" "-vv"
-                      "-n" (number->string (parallel-job-count))
-                      "-k"
-                      (string-append
-                       ;; These tests cannot be run in parallel because their
-                       ;; test data would not be copied by xdist and lead to
-                       ;; import errors. (see:
-                       ;; https://github.com/microsoft/debugpy/issues/342 and
-                       ;; https://github.com/microsoft/debugpy/issues/880).
-                       "not test_custom_python_args "
-                       "and not test_autokill ")))))))
+              (when tests?
+                (invoke "pytest" "-vv"
+                        "-n" (number->string (parallel-job-count))
+                        "-k"
+                        (string-append
+                         ;; These tests cannot be run in parallel because their
+                         ;; test data would not be copied by xdist and lead to
+                         ;; import errors. (see:
+                         ;; https://github.com/microsoft/debugpy/issues/342 and
+                         ;; https://github.com/microsoft/debugpy/issues/880).
+                         "not test_custom_python_args "
+                         "and not test_autokill "))))))))
     (native-inputs
      ;; See: https://raw.githubusercontent.com/microsoft/debugpy/
      ;;      main/tests/requirements.txt.
-- 
2.35.1





Information forwarded to guix-patches <at> gnu.org:
bug#55866; Package guix-patches. (Thu, 09 Jun 2022 20:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 55866 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Lars-Dominik Braun <lars <at> 6xq.net>, 55866 <at> debbugs.gnu.org
Subject: Re: [bug#55866] [PATCH 0/2] Disable tests failing due to
 YAMA’s ptrace_scope.
Date: Thu, 09 Jun 2022 22:46:46 +0200
[Message part 1 (text/plain, inline)]
Lars-Dominik Braun schreef op do 09-06-2022 om 10:51 [+0200]:
> Hi,
> 
> I noticed that some tests fail on my foreign distribution,
> but not on Guix System, because they differ in their
> /proc/sys/kernel/yama/ptrace_scope. Guix sets it to 0 (no limitations),
> whereas most distributions default to 1 (only children can be ptrace’d),
> causing a reproducibility issue. The following patches therefore disable
> tests, which fail with a setting of >0.

Sounds reasonable to me, though I recommend reporting the issue
upstream such that they can adjust their test suites to skip the tests
when YAMA interferes.

Greetings,Maxime.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Lars-Dominik Braun <lars <at> 6xq.net>:
You have taken responsibility. (Fri, 10 Jun 2022 09:44:02 GMT) Full text and rfc822 format available.

Notification sent to Lars-Dominik Braun <lars <at> 6xq.net>:
bug acknowledged by developer. (Fri, 10 Jun 2022 09:44:02 GMT) Full text and rfc822 format available.

Message #19 received at 55866-done <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 55866-done <at> debbugs.gnu.org
Subject: Re: [bug#55866] [PATCH 0/2] Disable tests failing due to YAMA’s ptrace_scope.
Date: Fri, 10 Jun 2022 11:43:10 +0200
Hi Maxime,

> Sounds reasonable to me, though I recommend reporting the issue
> upstream such that they can adjust their test suites to skip the tests
> when YAMA interferes.
pushed as 9d2ef7344e340747640dc00413aa6a7b054f022a and
3e6bc1edca0c7ee4e8bfe0d8e783db48d2bb647c. I added a link to the upstream
report in the comments. Doesn’t make much sense for python-debugpy
though, since we’d end up with no test suite at all.

Thank you very much,
Lars





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 08 Jul 2022 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 293 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.