guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: tests: Fix file-needed/recursive on powerpc64le-linux.


From: guix-commits
Subject: 01/04: tests: Fix file-needed/recursive on powerpc64le-linux.
Date: Sat, 8 Jan 2022 19:04:31 -0500 (EST)

marusich pushed a commit to branch master
in repository guix.

commit 6a2050b1e1c7f09ef9b6af43044b7c0e4786d39d
Author: Chris Marusich <cmmarusich@gmail.com>
AuthorDate: Sat Jan 8 14:33:25 2022 -0800

    tests: Fix file-needed/recursive on powerpc64le-linux.
    
    Fixes: <https://issues.guix.gnu.org/52940>.
    
    * tests/gremlin.scm (file-needed/recursive): Consider two entries to be
    equivalent not when they are the same string, but rather when they refer to
    the same file.
    [ground-truth]: In addition to strings that begin with "linux-vdso.so", 
remove
    strings that begin with "linux-vdso64.so".
---
 tests/gremlin.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/gremlin.scm b/tests/gremlin.scm
index 9af899c89a..41cefd9c7c 100644
--- a/tests/gremlin.scm
+++ b/tests/gremlin.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2022 Chris Marusich <cmmarusich@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,6 +19,7 @@
 
 (define-module (test-gremlin)
   #:use-module (guix elf)
+  #:use-module (guix tests)
   #:use-module ((guix utils) #:select (call-with-temporary-directory))
   #:use-module (guix build utils)
   #:use-module (guix build gremlin)
@@ -90,13 +92,17 @@
            (if m
                (loop (cons (match:substring m 2) result))
                (loop result))))))
-
     (define ground-truth
-      (remove (cut string-prefix? "linux-vdso.so" <>)
+      (remove (lambda (entry)
+                (or (string-prefix? "linux-vdso.so" entry)
+                    (string-prefix? "linux-vdso64.so" entry)))
               (read-ldd-output pipe)))
 
     (and (zero? (close-pipe pipe))
-         (lset= string=? (pk 'truth ground-truth) (pk 'needed needed)))))
+         ;; It's OK if file-needed/recursive returns multiple entries that are
+         ;; different strings referring to the same file.  This appears to be a
+         ;; benign edge case.  See: https://issues.guix.gnu.org/52940
+         (lset= file=? (pk 'truth ground-truth) (pk 'needed needed)))))
 
 (test-equal "expand-origin"
   '("OOO/../lib"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]