GNU bug report logs - #25974
[PATCH 0/2] gnu: nss: Skip failing test on armhf.

Previous Next

Package: guix-patches;

Reported by: Marius Bakke <mbakke <at> fastmail.com>

Date: Sun, 5 Mar 2017 14:48:01 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

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 25974 in the body.
You can then email your comments to 25974 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#25974; Package guix-patches. (Sun, 05 Mar 2017 14:48:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <mbakke <at> fastmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 05 Mar 2017 14:48:01 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: guix-patches <at> gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH 0/2] gnu: nss: Skip failing test on armhf.
Date: Sun,  5 Mar 2017 15:47:35 +0100
Patch 2/2 in this series conditionally skips the failing test on armhf.
Unfortunately patch 1/2 will rebuild nss on all platforms; I could not
figure out how to achieve the same without 'modify-phases'.

Is this acceptable, or should we downgrade nspr and nss again?


Marius Bakke (2):
  gnu: nss: Use 'modify-phases' syntax.
  gnu: nss: Skip failing test on armhf.

 gnu/local.mk                                   |   1 +
 gnu/packages/gnuzilla.scm                      | 109 ++++++++++++++-----------
 gnu/packages/patches/nss-skip-test-armhf.patch |  17 ++++
 3 files changed, 78 insertions(+), 49 deletions(-)
 create mode 100644 gnu/packages/patches/nss-skip-test-armhf.patch

-- 
2.12.0





Information forwarded to guix-patches <at> gnu.org:
bug#25974; Package guix-patches. (Sun, 05 Mar 2017 14:50:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: 25974 <at> debbugs.gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH 1/2] gnu: nss: Use 'modify-phases' syntax.
Date: Sun,  5 Mar 2017 15:49:49 +0100
* gnu/packages/gnuzilla.scm (nss)[arguments]: Use 'modify-phases'.
---
 gnu/packages/gnuzilla.scm | 91 +++++++++++++++++++++++------------------------
 1 file changed, 44 insertions(+), 47 deletions(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index c4543aa7d..34ad25ed3 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -221,55 +221,52 @@ in the Mozilla clients.")
                   (ice-9 match)
                   (srfi srfi-26))
        #:phases
-       (alist-replace
-        'configure
-        (lambda* (#:key system inputs #:allow-other-keys)
-          (setenv "CC" "gcc")
-          ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
-          (when (string-prefix? "x86_64" system)
-            (setenv "USE_64" "1"))
-          #t)
-        (alist-replace
-         'check
-         (lambda _
-           ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
-           ;; The later requires a working DNS or /etc/hosts.
-           (setenv "DOMSUF" "(none)")
-           (setenv "USE_IP" "TRUE")
-           (setenv "IP_ADDRESS" "127.0.0.1")
-           (zero? (system* "./nss/tests/all.sh")))
-         (alist-replace
-          'install
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((out (assoc-ref outputs "out"))
-                   (bin (string-append (assoc-ref outputs "bin") "/bin"))
-                   (inc (string-append out "/include/nss"))
-                   (lib (string-append out "/lib/nss"))
-                   (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
-                          ((obj) (string-append "dist/" obj)))))
-              ;; Install nss-config to $out/bin.
-              (install-file (string-append obj "/bin/nss-config")
-                            (string-append out "/bin"))
-              (delete-file (string-append obj "/bin/nss-config"))
-              ;; Install nss.pc to $out/lib/pkgconfig.
-              (install-file (string-append obj "/lib/pkgconfig/nss.pc")
-                            (string-append out "/lib/pkgconfig"))
-              (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
-              (rmdir (string-append obj "/lib/pkgconfig"))
-              ;; Install other files.
-              (copy-recursively "dist/public/nss" inc)
-              (copy-recursively (string-append obj "/bin") bin)
-              (copy-recursively (string-append obj "/lib") lib)
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key system inputs #:allow-other-keys)
+             (setenv "CC" "gcc")
+             ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
+             (when (string-prefix? "x86_64" system)
+               (setenv "USE_64" "1"))
+             #t))
+         (replace 'check
+           (lambda _
+             ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
+             ;; The later requires a working DNS or /etc/hosts.
+             (setenv "DOMSUF" "(none)")
+             (setenv "USE_IP" "TRUE")
+             (setenv "IP_ADDRESS" "127.0.0.1")
+             (zero? (system* "./nss/tests/all.sh"))))
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (bin (string-append (assoc-ref outputs "bin") "/bin"))
+                      (inc (string-append out "/include/nss"))
+                      (lib (string-append out "/lib/nss"))
+                      (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
+                             ((obj) (string-append "dist/" obj)))))
+                 ;; Install nss-config to $out/bin.
+                 (install-file (string-append obj "/bin/nss-config")
+                               (string-append out "/bin"))
+                 (delete-file (string-append obj "/bin/nss-config"))
+                 ;; Install nss.pc to $out/lib/pkgconfig.
+                 (install-file (string-append obj "/lib/pkgconfig/nss.pc")
+                               (string-append out "/lib/pkgconfig"))
+                 (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
+                 (rmdir (string-append obj "/lib/pkgconfig"))
+                 ;; Install other files.
+                 (copy-recursively "dist/public/nss" inc)
+                 (copy-recursively (string-append obj "/bin") bin)
+                 (copy-recursively (string-append obj "/lib") lib)
 
-              ;; FIXME: libgtest1.so is installed in the above step, and it's
-              ;; (unnecessarily) linked with several NSS libraries, but
-              ;; without the needed rpaths, causing the 'validate-runpath'
-              ;; phase to fail.  Here we simply delete libgtest1.so, since it
-              ;; seems to be used only during the tests.
-              (delete-file (string-append lib "/libgtest1.so"))
+                 ;; FIXME: libgtest1.so is installed in the above step, and it's
+                 ;; (unnecessarily) linked with several NSS libraries, but
+                 ;; without the needed rpaths, causing the 'validate-runpath'
+                 ;; phase to fail.  Here we simply delete libgtest1.so, since it
+                 ;; seems to be used only during the tests.
+                 (delete-file (string-append lib "/libgtest1.so"))
 
-              #t))
-          %standard-phases)))))
+                 #t))))))
     (inputs
      `(("sqlite" ,sqlite)
        ("zlib" ,zlib)))
-- 
2.12.0





Information forwarded to guix-patches <at> gnu.org:
bug#25974; Package guix-patches. (Sun, 05 Mar 2017 14:51:01 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: 25974 <at> debbugs.gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH 2/2] gnu: nss: Skip failing test on armhf.
Date: Sun,  5 Mar 2017 15:49:50 +0100
* gnu/packages/patches/nss-skip-test-armhf.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gnuzilla.scm (nss)[native-inputs]: Add patch.
[arguments]: Add phase to apply when target system is armhf.
---
 gnu/local.mk                                   |  1 +
 gnu/packages/gnuzilla.scm                      | 18 ++++++++++++++++--
 gnu/packages/patches/nss-skip-test-armhf.patch | 17 +++++++++++++++++
 3 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/nss-skip-test-armhf.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c88892df5..9db9ba18d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -781,6 +781,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ninja-zero-mtime.patch			\
   %D%/packages/patches/node-9077.patch				\
   %D%/packages/patches/nss-pkgconfig.patch			\
+  %D%/packages/patches/nss-skip-test-armhf.patch		\
   %D%/packages/patches/ntfs-3g-CVE-2017-0358.patch		\
   %D%/packages/patches/nvi-assume-preserve-path.patch		\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 34ad25ed3..183dc5e83 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong <at> gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
+;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -203,7 +204,7 @@ in the Mozilla clients.")
     (build-system gnu-build-system)
     (outputs '("out" "bin"))
     (arguments
-     '(#:parallel-build? #f ; failed
+     `(#:parallel-build? #f ; failed
        #:make-flags
        (let* ((out (assoc-ref %outputs "out"))
               (nspr (string-append (assoc-ref %build-inputs "nspr")))
@@ -229,6 +230,14 @@ in the Mozilla clients.")
              (when (string-prefix? "x86_64" system)
                (setenv "USE_64" "1"))
              #t))
+         ,@(if (string-prefix? "armhf" (or (%current-target-system)
+                                           (%current-system)))
+               `((add-after
+                  'unpack 'skip-failing-test
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (let ((patch (assoc-ref inputs "skip-test-armhf")))
+                      (zero? (system* "patch" "-p1" "--input" patch))))))
+               '())
          (replace 'check
            (lambda _
              ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
@@ -271,7 +280,12 @@ in the Mozilla clients.")
      `(("sqlite" ,sqlite)
        ("zlib" ,zlib)))
     (propagated-inputs `(("nspr" ,nspr))) ; required by nss.pc.
-    (native-inputs `(("perl" ,perl)))
+    (native-inputs `(("perl" ,perl)
+                     ,@(if (string-prefix? "armhf" (or (%current-target-system)
+                                                       (%current-system)))
+                           `(("skip-test-armhf"
+                              ,(search-patch "nss-skip-test-armhf.patch")))
+                           '())))
 
     ;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when
     ;; another build is happening concurrently on the same machine.
diff --git a/gnu/packages/patches/nss-skip-test-armhf.patch b/gnu/packages/patches/nss-skip-test-armhf.patch
new file mode 100644
index 000000000..4b7137688
--- /dev/null
+++ b/gnu/packages/patches/nss-skip-test-armhf.patch
@@ -0,0 +1,17 @@
+--- nss-3.29.2/nss/gtests/ssl_gtest/ssl_skip_unittest.cc	2017-03-05 14:07:38.952200827 +0100
++++ nss-3.29.2/nss/gtests/ssl_gtest/ssl_skip_unittest.cc	2017-03-05 14:07:52.964650050 +0100
+@@ -165,14 +165,6 @@
+   client_->CheckErrorCode(SSL_ERROR_RX_UNEXPECTED_HELLO_DONE);
+ }
+ 
+-TEST_P(TlsSkipTest, SkipCertAndKeyExch) {
+-  auto chain = new ChainedPacketFilter();
+-  chain->Add(new TlsHandshakeSkipFilter(kTlsHandshakeCertificate));
+-  chain->Add(new TlsHandshakeSkipFilter(kTlsHandshakeServerKeyExchange));
+-  ServerSkipTest(chain);
+-  client_->CheckErrorCode(SSL_ERROR_RX_UNEXPECTED_HELLO_DONE);
+-}
+-
+ TEST_P(TlsSkipTest, SkipCertAndKeyExchEcdsa) {
+   Reset(TlsAgent::kServerEcdsa256);
+   auto chain = new ChainedPacketFilter();
-- 
2.12.0





Information forwarded to guix-patches <at> gnu.org:
bug#25974; Package guix-patches. (Sun, 05 Mar 2017 21:34:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 25974 <at> debbugs.gnu.org
Subject: Re: bug#25974: [PATCH 0/2] gnu: nss: Skip failing test on armhf.
Date: Sun, 5 Mar 2017 16:33:29 -0500
[Message part 1 (text/plain, inline)]
On Sun, Mar 05, 2017 at 03:47:35PM +0100, Marius Bakke wrote:
> Patch 2/2 in this series conditionally skips the failing test on armhf.
> Unfortunately patch 1/2 will rebuild nss on all platforms; I could not
> figure out how to achieve the same without 'modify-phases'.

That's a minor issue. Ping me when / if you push the change and I'll ask
to evaluate the master branch.

> Is this acceptable, or should we downgrade nspr and nss again?

I do not think we should downgrade. I expect that most Guix users are
using the new versions of NSS without any trouble on the x86_64
architecture.

We should either skip this test on armhf or downgrade the packages on
armhf.

Do we understand the nature of the test failure, and what sort of
problems could be masked if we skip the test?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25974; Package guix-patches. (Mon, 06 Mar 2017 22:17:01 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 25974 <at> debbugs.gnu.org
Subject: Re: bug#25974: [PATCH 0/2] gnu: nss: Skip failing test on armhf.
Date: Mon, 06 Mar 2017 23:16:43 +0100
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:

> On Sun, Mar 05, 2017 at 03:47:35PM +0100, Marius Bakke wrote:
>> Patch 2/2 in this series conditionally skips the failing test on armhf.
>> Unfortunately patch 1/2 will rebuild nss on all platforms; I could not
>> figure out how to achieve the same without 'modify-phases'.
>
> That's a minor issue. Ping me when / if you push the change and I'll ask
> to evaluate the master branch.
>
>> Is this acceptable, or should we downgrade nspr and nss again?
>
> I do not think we should downgrade. I expect that most Guix users are
> using the new versions of NSS without any trouble on the x86_64
> architecture.
>
> We should either skip this test on armhf or downgrade the packages on
> armhf.
>
> Do we understand the nature of the test failure, and what sort of
> problems could be masked if we skip the test?

I see the build was restarted and this time it's a different error.

The test that failed in the first round was

"SkipVariants/TlsSkipTest.SkipCertAndKeyExch/0"

and in the second run it's

"ExtensionStream/TlsExtensionTestGeneric.NoSupportedGroups/2"

I also note that these two tests take on the order of 50ms under normal
conditions, but took 51499ms and 20492ms respectively when failing.

So it appears to be a problem with the build host rather than NSS
itself. Can you try starting it again? I guess the best solution is
increasing capacity of the build farm...
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25974; Package guix-patches. (Mon, 06 Mar 2017 22:53:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 25974 <at> debbugs.gnu.org
Subject: Re: bug#25974: [PATCH 0/2] gnu: nss: Skip failing test on armhf.
Date: Mon, 6 Mar 2017 17:52:48 -0500
[Message part 1 (text/plain, inline)]
On Mon, Mar 06, 2017 at 11:16:43PM +0100, Marius Bakke wrote:
> So it appears to be a problem with the build host rather than NSS
> itself. Can you try starting it again? I guess the best solution is
> increasing capacity of the build farm...

I restarted it again.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25974; Package guix-patches. (Mon, 13 Mar 2017 13:15:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: Marius Bakke <mbakke <at> fastmail.com>, 25974 <at> debbugs.gnu.org
Subject: Re: bug#25974: [PATCH 0/2] gnu: nss: Skip failing test on armhf.
Date: Mon, 13 Mar 2017 14:13:57 +0100
Leo Famulari <leo <at> famulari.name> skribis:

> On Mon, Mar 06, 2017 at 11:16:43PM +0100, Marius Bakke wrote:
>> So it appears to be a problem with the build host rather than NSS
>> itself. Can you try starting it again? I guess the best solution is
>> increasing capacity of the build farm...
>
> I restarted it again.

NSS seems to build fine now:

  https://hydra.gnu.org/job/gnu/master/nss-3.29.2.x86_64-linux

(The job was marked as failed due a transient error or something while
retrieving the result, but the derivation built successfully:
<https://mirror.hydra.gnu.org/qqy7vwlaajycsbh53pcdab4xs3papbx5.narinfo>
and
<https://mirror.hydra.gnu.org/vv78nq50j3k6v1rwi58vbpz7fynpc59h.narinfo>.)

Should we close this bug?

Thanks,
Ludo’.




Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Mon, 13 Mar 2017 15:27:01 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <mbakke <at> fastmail.com>:
bug acknowledged by developer. (Mon, 13 Mar 2017 15:27:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>, Leo Famulari
 <leo <at> famulari.name>
Cc: 25974-done <at> debbugs.gnu.org
Subject: Re: bug#25974: [PATCH 0/2] gnu: nss: Skip failing test on armhf.
Date: Mon, 13 Mar 2017 16:26:31 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Leo Famulari <leo <at> famulari.name> skribis:
>
>> On Mon, Mar 06, 2017 at 11:16:43PM +0100, Marius Bakke wrote:
>>> So it appears to be a problem with the build host rather than NSS
>>> itself. Can you try starting it again? I guess the best solution is
>>> increasing capacity of the build farm...
>>
>> I restarted it again.
>
> NSS seems to build fine now:
>
>   https://hydra.gnu.org/job/gnu/master/nss-3.29.2.x86_64-linux

Finally! :)

>
> (The job was marked as failed due a transient error or something while
> retrieving the result, but the derivation built successfully:
> <https://mirror.hydra.gnu.org/qqy7vwlaajycsbh53pcdab4xs3papbx5.narinfo>
> and
> <https://mirror.hydra.gnu.org/vv78nq50j3k6v1rwi58vbpz7fynpc59h.narinfo>.)
>
> Should we close this bug?

Closed!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Apr 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 132 days ago.

Previous Next


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