summaryrefslogtreecommitdiff
path: root/testsuite/cpio.tests
diff options
context:
space:
mode:
authorDenis Vlasenko2008-05-02 21:46:30 +0000
committerDenis Vlasenko2008-05-02 21:46:30 +0000
commit687a26fe0dcf10f227cb0541882d1daa8a21991d (patch)
tree2bc145dfd405a157cc1448d9f5889373ef773a67 /testsuite/cpio.tests
parent4e79049e109a9651b462c5dcf9559f9fef2b0cc8 (diff)
downloadbusybox-687a26fe0dcf10f227cb0541882d1daa8a21991d.zip
busybox-687a26fe0dcf10f227cb0541882d1daa8a21991d.tar.gz
more fixes to testsuite by Cristian and vda
Diffstat (limited to 'testsuite/cpio.tests')
-rwxr-xr-xtestsuite/cpio.tests14
1 files changed, 12 insertions, 2 deletions
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests
index 408a3fb..d42e514 100755
--- a/testsuite/cpio.tests
+++ b/testsuite/cpio.tests
@@ -4,6 +4,13 @@
. testing.sh
+# check if hexdump supports the '-R' option
+hexdump -R </dev/null >/dev/null 2>&1 || {
+ echo "'hexdump -R' is not available" >&2
+ SKIP=1
+ exit 1
+}
+
# ls -ln is showing date. Need to remove that, it's variable
# sed: coalesce spaces
# cut: remove date
@@ -24,6 +31,9 @@ hexdump="\
00000090 14 24 19 07 a4 63 00
"
+user=$(id -u)
+group=$(id -g)
+
rm -rf cpio.testdir
# testing "test name" "options" "expected result" "file input" "stdin"
@@ -34,8 +44,8 @@ testing "cpio extracts zero-sized hardlinks" \
"\
1 blocks
0
--rw-r--r-- 2 0 0 0 x
--rw-r--r-- 2 0 0 0 y
+-rw-r--r-- 2 $user $group 0 x
+-rw-r--r-- 2 $user $group 0 y
" \
"" ""