mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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.
This commit is contained in:
parent
3f6c5c6f78
commit
2880dc3046
1 changed files with 9 additions and 3 deletions
|
@ -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-module (test-cpio)
|
|||
(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))
|
||||
|
|
Loading…
Reference in a new issue