[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/06: cpio: Skip test on inode numbers that don't fit on 32 bits.
From: |
guix-commits |
Subject: |
03/06: cpio: Skip test on inode numbers that don't fit on 32 bits. |
Date: |
Tue, 20 Dec 2022 11:13:25 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 2880dc3046170e9129437caca586f13956d0d811
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Dec 20 10:35:37 2022 +0100
cpio: Skip test on inode numbers that don't fit on 32 bits.
Fixes <https://issues.guix.gnu.org/60202>.
Reported by Christopher Baines <mail@cbaines.net>.
* tests/cpio.scm (%test-file): New variable.
("file->cpio-header + write-cpio-header + read-cpio-header"): Use it.
Skip test when the inode number of %TEST-FILE is too big.
---
tests/cpio.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/cpio.scm b/tests/cpio.scm
index 516de0655b..832101d1bb 100644
--- a/tests/cpio.scm
+++ b/tests/cpio.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,12 +31,18 @@
(define %cpio-program
(which "cpio"))
+(define %test-file
+ (search-path %load-path "guix.scm"))
+
(test-begin "cpio")
+;; The cpio format expects 'ino' to fit in 32 bits. If we have a bigger inode
+;; number, skip this test.
+(test-skip
+ (if (>= (stat:ino (lstat %test-file)) (expt 2 32)) 1 0))
(test-assert "file->cpio-header + write-cpio-header + read-cpio-header"
- (let* ((file (search-path %load-path "guix.scm"))
- (header (file->cpio-header file)))
+ (let* ((header (file->cpio-header %test-file)))
(call-with-values
(lambda ()
(open-bytevector-output-port))
- branch master updated (7fb27b5441 -> fcc4e51e61), guix-commits, 2022/12/20
- 03/06: cpio: Skip test on inode numbers that don't fit on 32 bits.,
guix-commits <=
- 04/06: services: opensmtpd: Use 'match-record' instead of 'match'., guix-commits, 2022/12/20
- 06/06: read-print: Add special forms., guix-commits, 2022/12/20
- 02/06: doc: Avoid 'match' on the <udev-configuration> record., guix-commits, 2022/12/20
- 01/06: tests: Adjust 'guix package' test to latest package search metrics., guix-commits, 2022/12/20
- 05/06: services: opensmtpd: Add 'shepherd-requirement' field., guix-commits, 2022/12/20