From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yHUgH9t8oGNP+AAAbAwnHQ (envelope-from ) for ; Mon, 19 Dec 2022 16:01:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EPkdH9t8oGNfJQAA9RJhRA (envelope-from ) for ; Mon, 19 Dec 2022 16:01:47 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8F4BF18D96 for ; Mon, 19 Dec 2022 16:01:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7Hdc-0006ah-0E; Mon, 19 Dec 2022 10:01:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7HdY-0006Zc-DF for bug-guix@gnu.org; Mon, 19 Dec 2022 10:01:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7HdW-0006tu-Me for bug-guix@gnu.org; Mon, 19 Dec 2022 10:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7HdW-0003MZ-HX for bug-guix@gnu.org; Mon, 19 Dec 2022 10:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#60202: tests/cpio failure Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 19 Dec 2022 15:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60202 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Baines Cc: 60202@debbugs.gnu.org Received: via spool by 60202-submit@debbugs.gnu.org id=B60202.167146203412893 (code B ref 60202); Mon, 19 Dec 2022 15:01:02 +0000 Received: (at 60202) by debbugs.gnu.org; 19 Dec 2022 15:00:34 +0000 Received: from localhost ([127.0.0.1]:38641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Hd4-0003Lt-F1 for submit@debbugs.gnu.org; Mon, 19 Dec 2022 10:00:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Hd0-0003Ln-Pb for 60202@debbugs.gnu.org; Mon, 19 Dec 2022 10:00:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7Hcv-0006li-HB; Mon, 19 Dec 2022 10:00:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=pL6uA+gNEkCGVEKkn8ot3ITcaxw0F1BGIaAT288PYa8=; b=hydlyR1XTzMbRTWgGz2Z bPwVS/3H0gq7imAlD4ZRHH5C731TU9FnzGr0T5yGmrbVtER9qXmALPYjNJHXWu/HcjtzNsUzDCdez fRb5+HlXlJ4iMtNv1p5Xor9hGVf0DFYTJlx3uaiuhH1/Icd9TSe1NcztgfFnb2urK1EhM47E2xdkH PsenKjMUa50PHNixVHojHPe4fy7QEhA/F0HNWTahu7NCpbJ+nQVweTIT5nWs7yM5HAanJy8fqu2U9 xn8SsN/4CDdVLT1Sf4yAvlbYXt4x/5AS4lhBjeyrQLdY8ti21EbBs2+/IIsH3i19BAf1qC2n7g7XR /yUBtfcvqvdOmQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7Hcv-0003v0-5B; Mon, 19 Dec 2022 10:00:25 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <871qovo3i3.fsf@cbaines.net> Date: Mon, 19 Dec 2022 16:00:22 +0100 In-Reply-To: <871qovo3i3.fsf@cbaines.net> (Christopher Baines's message of "Mon, 19 Dec 2022 14:44:20 +0000") Message-ID: <87tu1rcubd.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=hydlyR1X; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671462083; a=rsa-sha256; cv=none; b=Wh125a9y2SpCJy8b70bVcTVLpLVZg8YgxijmAJ9slTKz8g2Wm0xkcjawjaYS5UZivRCZrp w8tQzJYJrgUlYrhFSO1JNIlnNIUwKwQfGWBUSt32TBTKKlbgTVccjwgym9lFSRHhQK9Jzv CHmeglfh31dPJG2m6zdigjRSBigXK7gmJLj3006f2hUG4VqNORZ/aVcY4bdnnpx1afNmp0 uoBDlhhdwVSiD4MFkhF8y36BEWQS690Xwlf1kHr3SaMxSBqlRTgDyJOT6kUXO0hhtRBuM6 ZkZJMl7Nc5sJJ/i1uK1xS8zql1No29fuY5aSl0t0lKcsnnaR6MKIJGi0yntu5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671462083; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=xdhIZzQTK+iYH+F/+/SQPSE7Qdko5f96I/zh5sVjSCI=; b=EhF95IVcRJlVu8IsawJ4SkTOx0IAvzfErgWDYSz8CXZZwV1+XDanTBKygaZzY/avx3Ppxg Q7PGpkYXa7rhYSyLd+rd5RINDfON3pnKrvc77Uk9LhjLM0WvrtPs/jk1qZ16+2ex5pFQTC VBuUOmE7RxAoHlCuicC/3yujYs4ENiiRyvFw0dFwArKQCmBXDSxxM+gspaWHarcsVtMVzg T94llR9R2HXoV8L2jwsJ0hZv5s3Gb/Yx66Af5fFeBAt9X8smwcHj+OVcMLBi3EEVDfzIPP Bm6Z7tBH2hfgVSXVon/mZZENu4dtwJXSb6DWRyerx44RGTL3hdoFT56IfqDuog== Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=hydlyR1X; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.89 X-Spam-Score: -2.89 X-Migadu-Queue-Id: 8F4BF18D96 X-TUID: G4DiD83W3Tc+ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Christopher Baines skribis: > This test seems to fail, maybe because of high inode numbers, maybe > something to with btrfs. Uh. > scheme@(guix-user)> (file->cpio-header "guix/guix.scm") > $1 =3D #< magic: 460545 ino: 5031515288 mode: 33188 uid: 100= 3 gid: 998 nlink: 1 mtime: 1671460627 file-size: 1452 dev-maj: 0 dev-min: 2= 4 rdev-maj: 0 rdev-min: 0 name-size: 14 checksum: 0> [...] > (let ((port (open-bytevector-input-port (get-bv)))) > (equal? (peek "A" header) > (peek "B" (read-cpio-header port)))))) > > ;;; ("A" #< magic: 460545 ino: 5031515288 mode: 33188 uid: 1= 003 gid: 998 nlink: 1 mtime: 1671460627 file-size: 1452 dev-maj: 0 dev-min:= 24 rdev-maj: 0 rdev-min: 0 name-size: 14 checksum: 0>) > > ;;; ("B" #< magic: 460545 ino: 736547992 mode: 33188 uid: 10= 03 gid: 998 nlink: 1 mtime: 1671460627 file-size: 1452 dev-maj: 0 dev-min: = 24 rdev-maj: 0 rdev-min: 0 name-size: 14 checksum: 0>) > $3 =3D #f (guix cpio) defines cpio headers like this: --8<---------------cut here---------------start------------->8--- (define-pack %make-cpio-header cpio-header? write-cpio-header read-cpio-header (magic 6 cpio-header-magic) (ino 8 cpio-header-inode) (mode 8 cpio-header-mode) (uid 8 cpio-header-uid) (gid 8 cpio-header-gid) (nlink 8 cpio-header-nlink) (mtime 8 cpio-header-mtime) (file-size 8 cpio-header-file-size) (dev-maj 8 cpio-header-device-major) (dev-min 8 cpio-header-device-minor) (rdev-maj 8 cpio-header-rdevice-major) (rdev-min 8 cpio-header-rdevice-minor) (name-size 8 cpio-header-name-size) (checksum 8 cpio-header-checksum)) ;0 for "newc" format --8<---------------cut here---------------end--------------->8--- The =E2=80=98ino=E2=80=99 value is stored as an 8-digit hexadecimal number= =E2=80=94i.e., on 32 bits. And, guess what: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> 5031515288 ;the inode number above $15 =3D 5031515288 scheme@(guile-user)> (expt 2 32) $16 =3D 4294967296 scheme@(guile-user)> (- $16 $15) $17 =3D -736547992 --8<---------------cut here---------------end--------------->8--- Noways, libc + kernel typically use a 64-bit =E2=80=98ino_t=E2=80=99, so fu= ndamentally the cpio format is =E2=80=9Cwrong=E2=80=9D. But what can we do? At least we can skip this test when that is the case (patch below). WDYT? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =C2=A9 2015 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2015, 2022 Ludovic Court=C3=A8s ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,12 +31,18 @@ (define-module (test-cpio) (define %cpio-program (which "cpio")) =20 +(define %test-file + (search-path %load-path "guix.scm")) + (test-begin "cpio") =20 +;; The cpio format expects 'ino' to fit in 32 bits. If we have a bigger i= node +;; number, skip this test. +(test-skip + (if (>=3D (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)) --=-=-=--