aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2016-11-03 00:25:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-11-04 22:32:46 +0100
commit46443a383cdd977d3b7644ffdac8041fa55e51da (patch)
tree0456e038d081f53e4dde91e7991665bd813874f5
parentaeaee43d5a4fc95405cc2047227d096b1ada55b6 (diff)
downloadbusybox-w32-46443a383cdd977d3b7644ffdac8041fa55e51da.tar.gz
busybox-w32-46443a383cdd977d3b7644ffdac8041fa55e51da.tar.bz2
busybox-w32-46443a383cdd977d3b7644ffdac8041fa55e51da.zip
cpio: add ownership (-R) test cases
Add ownership (-R) test cases. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-xtestsuite/cpio.tests24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests
index 4cd441a60..d44c95b10 100755
--- a/testsuite/cpio.tests
+++ b/testsuite/cpio.tests
@@ -127,6 +127,30 @@ testing "cpio extracts in existing directory" \
127" "" "" 127" "" ""
128SKIP= 128SKIP=
129 129
130testing "cpio uses by default uid/gid" \
131"echo $0 | cpio -o -H newc | cpio -tv 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \
132"\
133$user/$group
1340
135" "" ""
136SKIP=
137
138testing "cpio -R with create" \
139"echo $0 | cpio -o -H newc -R 1234:5678 | cpio -tv 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \
140"\
1411234/5678
1420
143" "" ""
144SKIP=
145
146testing "cpio -R with extract" \
147"echo $0 | cpio -o -H newc | cpio -tv -R 8765:4321 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \
148"\
1498765/4321
1500
151" "" ""
152SKIP=
153
130# Clean up 154# Clean up
131rm -rf cpio.testdir cpio.testdir2 2>/dev/null 155rm -rf cpio.testdir cpio.testdir2 2>/dev/null
132 156