aboutsummaryrefslogtreecommitdiff
path: root/testsuite/cpio.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/cpio.tests')
-rwxr-xr-xtestsuite/cpio.tests14
1 files changed, 10 insertions, 4 deletions
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests
index e53ade925..725e70eab 100755
--- a/testsuite/cpio.tests
+++ b/testsuite/cpio.tests
@@ -31,8 +31,9 @@ rm -rf cpio.testdir cpio.testdir2 2>/dev/null
31 31
32# testing "test name" "command" "expected result" "file input" "stdin" 32# testing "test name" "command" "expected result" "file input" "stdin"
33 33
34optional FEATURE_LS_SORTFILES FEATURE_LS_TIMESTAMPS
34testing "cpio extracts zero-sized hardlinks" \ 35testing "cpio extracts zero-sized hardlinks" \
35"$ECHO -ne '$hexdump' | bzcat | cpio -i; echo \$?; 36"$ECHO -ne '$hexdump' | bzcat | cpio -i 2>&1; echo \$?;
36ls -ln cpio.testdir | $FILTER_LS" \ 37ls -ln cpio.testdir | $FILTER_LS" \
37"\ 38"\
381 blocks 391 blocks
@@ -41,11 +42,12 @@ ls -ln cpio.testdir | $FILTER_LS" \
41-rw-r--r-- 2 $user $group 0 y 42-rw-r--r-- 2 $user $group 0 y
42" \ 43" \
43 "" "" 44 "" ""
45SKIP=
44 46
45 47
46test x"$SKIP_KNOWN_BUGS" = x"" && { 48test x"$SKIP_KNOWN_BUGS" = x"" && {
47# Currently fails. Numerous buglets: "1 blocks" versus "1 block", 49# Currently fails. Numerous buglets: "1 blocks" versus "1 block",
48# "1 block" must go to stderr, does not list cpio.testdir/x and cpio.testdir/y 50# does not list cpio.testdir/x and cpio.testdir/y
49testing "cpio lists hardlinks" \ 51testing "cpio lists hardlinks" \
50"$ECHO -ne '$hexdump' | bzcat | cpio -t 2>&1; echo \$?" \ 52"$ECHO -ne '$hexdump' | bzcat | cpio -t 2>&1; echo \$?" \
51"\ 53"\
@@ -69,8 +71,9 @@ ln cpio.testdir/empty cpio.testdir/empty1
69ln cpio.testdir/nonempty cpio.testdir/nonempty1 71ln cpio.testdir/nonempty cpio.testdir/nonempty1
70mkdir cpio.testdir2 72mkdir cpio.testdir2
71 73
74optional FEATURE_CPIO_O LONG_OPTS FEATURE_LS_SORTFILES FEATURE_LS_TIMESTAMPS
72testing "cpio extracts zero-sized hardlinks 2" \ 75testing "cpio extracts zero-sized hardlinks 2" \
73"find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i); echo \$?; 76"find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i 2>&1); echo \$?;
74ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \ 77ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \
75"\ 78"\
762 blocks 792 blocks
@@ -82,12 +85,14 @@ ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \
82-rw-r--r-- 1 $user $group 0 solo 85-rw-r--r-- 1 $user $group 0 solo
83" \ 86" \
84 "" "" 87 "" ""
88SKIP=
85 89
86 90
87# Was trying to create "/usr/bin", correct is "usr/bin". 91# Was trying to create "/usr/bin", correct is "usr/bin".
88rm -rf cpio.testdir 92rm -rf cpio.testdir
93optional FEATURE_CPIO_P
89testing "cpio -p with absolute paths" \ 94testing "cpio -p with absolute paths" \
90"echo /usr/bin | cpio -dp cpio.testdir; echo \$?; 95"echo /usr/bin | cpio -dp cpio.testdir 2>&1; echo \$?;
91ls cpio.testdir" \ 96ls cpio.testdir" \
92"\ 97"\
931 blocks 981 blocks
@@ -95,6 +100,7 @@ ls cpio.testdir" \
95usr 100usr
96" \ 101" \
97 "" "" 102 "" ""
103SKIP=
98 104
99 105
100# Clean up 106# Clean up