[Bug 297681] usr.bin/xinstall/install_test:stdin test is flaky in CI on riscv64

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 20 Aug 2026 13:45:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297681

            Bug ID: 297681
           Summary: usr.bin/xinstall/install_test:stdin test is flaky in
                    CI on riscv64
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: riscv
               URL: https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/1
                    6689/testReport/usr.bin.xinstall/install_test/stdin/hi
                    story/
                OS: Any
            Status: New
          Keywords: regression
          Severity: Affects Only Me
          Priority: ---
         Component: tests
          Assignee: des@FreeBSD.org
          Reporter: siva@FreeBSD.org
                CC: testing@FreeBSD.org

The 'usr.bin/xinstall/install_test:stdin' test intermittently fails in CI on
riscv64. I found a strange repro for this issue after jumping into an
interactive session with Bricoler:

bricoler freebsd-regression-test-suite --freebsd-src-git-checkout/url=/usr/src
--freebsd-src-git-checkout/branch= --freebsd-src-build/machine=riscv/riscv64
--freebsd-vm-image/rc_kld_list= --freebsd-vm-image/packages=
--freebsd-regression-test-suite/interactive=True

Here is my repro shell session:

root@freebsd:/usr/tests # kyua debug -p usr.bin/xinstall/install_test:stdin
Executing command [ mkdir dst ]
Executing command [ install - dst ]
Executing command [ test ! -e dst/file ]
Executing command [ install - dst/file ]
Executing command [ cmp -s file dst/file ]
Executing command [ chflags nouchg dst/file ]
Executing command [ rm -f dst/file ]
Fail: incorrect exit status: 1, expected: 0
stdout:

stderr:
rm: dst/file: Operation not permitted

Files left in work directory after failure: dst, file
The test failed and paused right before its cleanup routine.
Test work dir: /tmp/kyua.blFbfP/2/work
Press <Enter> to continue...
^Z[1] + Suspended               kyua debug -p
usr.bin/xinstall/install_test:stdin
root@freebsd:/usr/tests # ls -alho /tmp/kyua.blFbfP/2/work
total 16 KB
drwxr-xr-x  3 root wheel -  512B Aug 20 10:50 .
drwxr-xr-x  3 root wheel -  512B Aug 20 10:50 ..
drwxr-xr-x  2 root wheel -  512B Aug 20 10:50 dst
-rw-r--r--  1 root wheel -   40B Aug 20 10:50 file
root@freebsd:/usr/tests # ls -alho /tmp/kyua.blFbfP/2/work/dst
total 12 KB
drwxr-xr-x  2 root wheel -              512B Aug 20 10:50 .
drwxr-xr-x  3 root wheel -              512B Aug 20 10:50 ..
-rwxr-xr-x  1 root wheel uunlnk,opaque   40B Aug 20 10:50 file
root@freebsd:/usr/tests # rm /tmp/kyua.blFbfP/2/work/file 
root@freebsd:/usr/tests # ls -alho /tmp/kyua.blFbfP/2/work/dst
total 12 KB
drwxr-xr-x  2 root wheel -              512B Aug 20 10:50 .
drwxr-xr-x  3 root wheel -              512B Aug 20 10:52 ..
-rwxr-xr-x  1 root wheel uunlnk,opaque   40B Aug 20 10:50 file
root@freebsd:/usr/tests # rm /tmp/kyua.blFbfP/2/work/file
rm: /tmp/kyua.blFbfP/2/work/file: No such file or directory
root@freebsd:/usr/tests # ls -alho /tmp/kyua.blFbfP/2/work/dst
total 12 KB
drwxr-xr-x  2 root wheel -              512B Aug 20 10:50 .
drwxr-xr-x  3 root wheel -              512B Aug 20 10:52 ..
-rwxr-xr-x  1 root wheel uunlnk,opaque   40B Aug 20 10:50 file


The file shows up in an `ls -alho` even though the rm command is issued,
presumably due to
the uunlnk flag. I don't quite understand why `rm` succeeds and the file cannot
be removed in a future `rm` command though.

Is it intentional to install stdin and preserve the uunlnk flag on the
destination file? I don't understand how the test sometimes passes on riscv64
(and passes every time on other archs like amd64).

des@ to triage.

-- 
You are receiving this mail because:
You are on the CC list for the bug.