OSDN Git Service

More testsuite tweaks.
authorRob Landley <rob@landley.net>
Sun, 31 Jan 2016 22:28:43 +0000 (16:28 -0600)
committerRob Landley <rob@landley.net>
Sun, 31 Jan 2016 22:28:43 +0000 (16:28 -0600)
tests/chgrp.test
tests/chown.test
tests/cpio.test
tests/ifconfig.test
tests/losetup.test
tests/seq.test
tests/useradd.test

index 2af9385..5a741d9 100755 (executable)
@@ -4,7 +4,7 @@
 
 if [ "$(id -u)" -ne 0 ]
 then
-  echo "SKIPPED: chgrp (not root)"
+  echo "$SHOWSKIP: chgrp (not root)"
   continue 2>/dev/null
   exit
 fi
index 40ed7b5..408d5f3 100755 (executable)
@@ -4,7 +4,7 @@
 
 if [ "$(id -u)" -ne 0 ]
 then
-  echo "SKIPPED: chown (not root)"
+  echo "$SHOWSKIP: chown (not root)"
   continue 2>/dev/null
   exit
 fi
index d0528e5..2d91b06 100755 (executable)
@@ -25,10 +25,10 @@ printf '333' >dddd
 # the relevant bit should be here:
 # 110*5 + 4*3 + 2 + 6*3 = 550 + 12 + 20 = 582
 # files are padded to n*4, names are padded to 2 + n*4 due to the header length
-testing "cpio archive length" "cpio -o -H newc|dd ibs=2 skip=291 count=5" "TRAILER!!!" "" "a\nbb\nccc\ndddd\n"
-testing "cpio archive magic" "cpio -o -H newc|dd ibs=2 count=3" "070701" "" "a\n"
+testing "cpio archive length" "cpio -o -H newc|dd ibs=2 skip=291 count=5 2>/dev/null" "TRAILER!!!" "" "a\nbb\nccc\ndddd\n"
+testing "cpio archive magic" "cpio -o -H newc|dd ibs=2 count=3 2>/dev/null" "070701" "" "a\n"
 # check name length (8 bytes before the empty "crc")
-testing "cpio name length" "cpio -o -H newc|dd ibs=2 skip=47 count=4" "00000002" "" "a\n"
+testing "cpio name length" "cpio -o -H newc|dd ibs=2 skip=47 count=4 2>/dev/null" "00000002" "" "a\n"
 rm a bb ccc dddd
 
 # archive dangling symlinks and empty files even if we cannot open them
index 0c0af46..c30c74c 100755 (executable)
@@ -23,7 +23,7 @@
 
 if [ "$(id -u)" -ne 0 ]
 then
-  echo "SKIPPED: ifconfig (not root)"
+  echo "$SHOWSKIP: ifconfig (not root)"
   continue 2>/dev/null
   exit
 fi
index fe1e520..84ac4b1 100755 (executable)
@@ -4,7 +4,7 @@
 
 if [ "$(id -u)" -ne 0 ]
 then
-  echo "SKIPPED: losetup (not root)"
+  echo "$SHOWSKIP: losetup (not root)"
   continue 2>/dev/null
   exit
 fi
index 4d23f8e..5996617 100755 (executable)
@@ -28,14 +28,14 @@ testing "seq separator and format string" "seq -f \%03g -s \; 5 -1 0" "005;004;0
 
 # Test -f format filtering
 for i in %f %e %g "boo %f yah" "% f" %-1.2f %+-f "%+ - f" %.2f %3.f "%'.2f" \
-       %%%f%% %%%f%%%
+       %%%f%%
 do
   testing "seq filter -f \"$i\"" "seq -f \"$i\" 1 3 > /dev/null && echo yes" \
     "yes\n" "" ""
 done
 # Test -f format filtering failures
 for i in %d %s "" "boo %f %f yah" "%*f" %-1.2.3f '%2$f' %1-f "%1 f" \
-       %2..2f
+       %2..2f %%%f%%%
 do
   testing "seq filter reject -f '$i'" \
     "seq -f '$i' 1 3 2>/dev/null || echo no" "no\n" "" ""
index a954e72..6ffe707 100755 (executable)
@@ -7,7 +7,7 @@
 
 if [ "$(id -u)" -ne 0 ]
 then
-  echo "SKIPPED: useradd (not root)"
+  echo "$SHOWSKIP: useradd (not root)"
   continue 2>/dev/null
   exit
 fi