From: Aaro Koskinen Date: Wed, 2 Nov 2016 22:25:05 +0000 (+0200) Subject: cpio: add ownership (-R) test cases X-Git-Tag: 1_26_0~85 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=46443a383cdd977d3b7644ffdac8041fa55e51da;p=oweals%2Fbusybox.git cpio: add ownership (-R) test cases Add ownership (-R) test cases. Signed-off-by: Aaro Koskinen Signed-off-by: Denys Vlasenko --- 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" \ " "" "" 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