When run under QEmu emulation emulated /proc files have unstable inode numbers. --- tests/cp/proc-short-read.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/cp/proc-short-read.sh b/tests/cp/proc-short-read.sh index 0f7c9e697..806fe285b 100755 --- a/tests/cp/proc-short-read.sh +++ b/tests/cp/proc-short-read.sh @@ -24,7 +24,13 @@ proc_large=/proc/cpuinfo # usually > 4KiB test -r $proc_large || skip_ "your system lacks $proc_large" # Before coreutils-7.3, cp would copy less than 4KiB of this file. -cp $proc_large 1 || fail=1 +# Skip this test when run under QEmu emulation where emulated /proc files +# have unstable inode numbers. +cp $proc_large 1 2>err \ + || { fail=1 + grep 'replaced while being copied' err \ + && skip_ "File $proc_large is being replaced while being copied"; } + cat $proc_large > 2 || fail=1 # adjust varying parts -- 2.40.0 -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."