GNU bug report logs - #72244
[PATCH core-updates] gnu: nss: Run tests with datefudge on 32bit systems.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 22 Jul 2024 12:47:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

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 72244 in the body.
You can then email your comments to 72244 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#72244; Package guix-patches. (Mon, 22 Jul 2024 12:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 22 Jul 2024 12:47:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH core-updates] gnu: nss: Run tests with datefudge on 32bit
 systems.
Date: Mon, 22 Jul 2024 13:46:33 +0100
As libfaketime has issues with 64bit time on 32bit systems.

* gnu/packages/nss.scm (nss)[arguments]: Tweak the gtests.sh script and use
datefudge rather than faketime on 32bit systems.
[native-inputs]: Use datetime rather than libfaketime on 32bit systems.

Change-Id: Ice97b2dc36049d6ad0a7d4154defd40b0ba41c94
---
 gnu/packages/nss.scm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 49276817ae..93c594d5e7 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -39,6 +39,7 @@ (define-module (gnu packages nss)
   #:use-module (gnu packages check)
   #:use-module (gnu packages crates-io)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages sqlite))
 
@@ -211,11 +212,21 @@ (define-public nss
                     (substitute* "nss/tests/dbtests/dbtests.sh"
                       ((" -lt 5") " -lt 50"))
 
+                    #$@(if (target-64bit?)
+                           #~()
+                           ;; Not sure why, but this avoids some tests failing
+                           ;; when using datefudge
+                           #~((substitute* "nss/tests/gtests/gtests.sh"
+                                (("cd \"\\$\\(dirname \"\\$1\"\\)\"") ""))))
+
                     ;; The "PayPalEE.cert" certificate expires every six months,
                     ;; leading to test failures:
                     ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>.  To
                     ;; work around that, set the time to roughly the release date.
-                    (invoke "faketime" "2024-01-23" "./nss/tests/all.sh"))
+                    (invoke #$(if (target-64bit?)
+                                  "faketime"
+                                  "datefudge")
+                            "2024-01-23" "./nss/tests/all.sh"))
                   (format #t "test suite not run~%"))))
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
@@ -240,7 +251,11 @@ (define-public nss
                 (copy-recursively (string-append obj "/lib") lib)))))))
     (inputs (list sqlite zlib))
     (propagated-inputs (list nspr))               ;required by nss.pc.
-    (native-inputs (list perl libfaketime which)) ;for tests
+    (native-inputs (list perl
+                         (if (target-64bit?)
+                             libfaketime
+                             datefudge)
+                         which)) ;for tests
 
     ;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when
     ;; another build is happening concurrently on the same machine.

base-commit: ffb56a574f03e5fb7d60ea46cc883bee7878f414
-- 
2.45.2





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 26 Jul 2024 09:16:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Fri, 26 Jul 2024 09:16:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 72244-done <at> debbugs.gnu.org
Subject: Re: bug#72244: [PATCH core-updates] gnu: nss: Run tests with
 datefudge on 32bit systems.
Date: Fri, 26 Jul 2024 11:14:50 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> As libfaketime has issues with 64bit time on 32bit systems.
>
> * gnu/packages/nss.scm (nss)[arguments]: Tweak the gtests.sh script and use
> datefudge rather than faketime on 32bit systems.
> [native-inputs]: Use datetime rather than libfaketime on 32bit systems.
>
> Change-Id: Ice97b2dc36049d6ad0a7d4154defd40b0ba41c94

I pushed a variant as 21fe1e077aa77488bd413ef3255973c60d7468fe, as
discussed in <https://issues.guix.gnu.org/72239>.

Ludo’.




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

This bug report was last modified 55 days ago.

Previous Next


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