NetBSD Problem Report #60353
From www@netbsd.org Tue Jun 23 15:45:20 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 2FBBE1A923B
for <gnats-bugs@gnats.NetBSD.org>; Tue, 23 Jun 2026 15:45:20 +0000 (UTC)
Message-Id: <20260623154518.D5AAB1A923C@mollari.NetBSD.org>
Date: Tue, 23 Jun 2026 15:45:18 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: cpio(1): tests are failing to run at all
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>
>Number: 60353
>Category: bin
>Synopsis: cpio(1): tests are failing to run at all
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 23 15:50:00 +0000 2026
>Last-Modified: Tue Jun 23 15:55:01 +0000 2026
>Originator: Taylor R Campbell
>Release: current
>Organization:
The NetCPIO Notfoundation
>Environment:
>Description:
Since the libarchive 3.8.7 update in May, the cpio(1) tests
have been failing to start because (a) the atf test working
directory is owned root:wheel and mode 0700 but (b) the cpio
test newly drops privileges to the uid of nobody and a gid that
is equal to the uid of nobody, which lacks permission to use
the bsdcpio symlink we create in the working directory to get
the tests matching:
https://releng.netbsd.org/b5reports/i386/commits-2026.05.html#build-2026.05.03.14.40.12
https://releng.netbsd.org/b5reports/i386/2026/2026.05.03.14.40.12/test.html#usr.bin_cpio_t_cpio_cpio
Test case: usr.bin/cpio/t_cpio/cpio
Duration: 0.023406 seconds
Termination reason
FAILED: atf-check failed; see the output of the test for details
Standard output stream
Executing command [ /usr/tests/usr.bin/cpio/h_cpio -p /tmp/atf-run.sib4SG/bsdcpio -r /usr/tests/usr.bin/cpio ]
Standard error stream
Fail: incorrect exit status: 1, expected: 0
stdout:
Will switch to user nobody (uid 32767 gid 39)
If tests fail or crash, details will be in:
/tmp/h_cpio.2026-05-04T06.04.46-000
Reference files will be read from: /usr/tests/usr.bin/cpio
Running tests on: "/tmp/atf-run.sib4SG/bsdcpio"
Exercising: bsdcpio 3.8.7 - libarchive 3.8.7 zlib/1.3.1 liblzma/5.8.3 bz2lib/1.0.8 libzstd/1.5.7 openssl/3.5.6 libb2/bundled
0: test_0
stderr:
File "/tmp/atf-run.sib4SG/bsdcpio" does not exist; aborting test.
>How-To-Repeat:
cd /usr/tests/usr.bin/cpio && atf-run | atf-report
>Fix:
Yes, please!
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60353 CVS commit: src
Date: Tue, 23 Jun 2026 15:52:58 +0000
Module Name: src
Committed By: riastradh
Date: Tue Jun 23 15:52:58 UTC 2026
Modified Files:
src/external/bsd/libarchive/dist/test_utils: test_main.c
src/tests/usr.bin/cpio: t_cpio.sh
Log Message:
libarchive: Fix cpio(1) tests.
1. When dropping privileges, setegid to the _gid_ of user `nobody',
not to the _uid_ of user `nobody'.
2. In the test, grant that user access to the atf test working
directory so it can execute the `bsdcpio' symlink we create in
order to get argv[0] set appropriately for the error messages that
the test checks for.
PR bin/60353: cpio(1): tests are failing to run at all
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/bsd/libarchive/dist/test_utils/test_main.c
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/cpio/t_cpio.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.