aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-04-16 01:39:08 -0500
committerRob Landley <rob@landley.net>2021-04-16 01:39:08 -0500
commitdafb9211c77788d7ea124aca18205e924d1ac48a (patch)
tree7e24566b090cae6334adfcf2148092323e2bd53b /tests
parent31eb5b82db0f1ec4a7d444fe2d53e2327f1cdd02 (diff)
downloadtoybox-dafb9211c77788d7ea124aca18205e924d1ac48a.tar.gz
cpio: continue past TRAILER!!! (like kernel does) but error on empty archive.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cpio.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/cpio.test b/tests/cpio.test
index 7e2955a1..3955800f 100755
--- a/tests/cpio.test
+++ b/tests/cpio.test
@@ -59,3 +59,6 @@ testing "-id keeps existing files" "echo new >a/b && cpio -id <a.cpio 2>/dev/nul
testing "-iu replaces existing files; no error" "echo new >a/b && cpio -iu <a.cpio && cat a/b" "old\n" "" ""
testing "-idu replaces existing files; no error" "echo new >a/b && cpio -idu <a.cpio && cat a/b" "old\n" "" ""
rm -rf a a.cpio
+
+testing "error on empty file" \
+ "setsid cpio -i < /dev/null 2>/dev/null || echo err" "err\n" "" ""