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>
This commit is contained in:
Aaro Koskinen 2016-11-03 00:25:05 +02:00 committed by Denys Vlasenko
parent aeaee43d5a
commit 46443a383c

View File

@ -127,6 +127,30 @@ testing "cpio extracts in existing directory" \
" "" ""
SKIP=
testing "cpio uses by default uid/gid" \
"echo $0 | cpio -o -H newc | cpio -tv 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \
"\
$user/$group
0
" "" ""
SKIP=
testing "cpio -R with create" \
"echo $0 | cpio -o -H newc -R 1234:5678 | cpio -tv 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \
"\
1234/5678
0
" "" ""
SKIP=
testing "cpio -R with extract" \
"echo $0 | cpio -o -H newc | cpio -tv -R 8765:4321 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \
"\
8765/4321
0
" "" ""
SKIP=
# Clean up
rm -rf cpio.testdir cpio.testdir2 2>/dev/null