← Commit list

25b756f78

Denys Vlasenko
Denys Vlasenko
2026-04-30
SUCCESS Duration: 145s

Subject

cpio.tests: fix false positive

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
gcc -Wp,-MD,applets/.usage.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer      -Iinclude -Iinclude -o applets/usage applets/usage.c

Build Log

(log yok)

Commit Diff GitHub →

testsuite/cpio.tests+3 -1
@@ -163,8 +163,10 @@ mkdir -p cpio.testdir/prepare/inner
echo "file outside of destination was written" > cpio.testdir/prepare/dont_write
echo "data" > cpio.testdir/prepare/inner/to_extract
mkdir -p cpio.testdir/extract
+# The output of "../dont_write" name by cpio -v can be either "../dont_write" or "dont_write" depending on FEATURE_TAR_LONG_OPTIONS.
+# sed 's:^../dont_write:dont_write:' is used to fix the output to be the same in either case.
testing "cpio extract file outside of destination" "\
-(cd cpio.testdir/prepare/inner && echo -e '../dont_write\nto_extract' | cpio -o -H newc) | (cd cpio.testdir/extract && cpio -vi 2>&1)
+(cd cpio.testdir/prepare/inner && echo -e '../dont_write\nto_extract' | cpio -o -H newc) | (cd cpio.testdir/extract && cpio -vi 2>&1) | sed 's:^../dont_write:dont_write:'
echo \$?
test -f cpio.testdir/dont_write || echo cpio.testdir/dont_write does not exist" \
"\