diff options
Diffstat (limited to 'tests/du')
-rwxr-xr-x | tests/du/2g | 7 | ||||
-rwxr-xr-x | tests/du/8gb | 12 | ||||
-rwxr-xr-x | tests/du/long-from-unreadable | 6 | ||||
-rwxr-xr-x | tests/du/long-sloop | 11 | ||||
-rwxr-xr-x | tests/du/slink | 9 |
5 files changed, 14 insertions, 31 deletions
diff --git a/tests/du/2g b/tests/du/2g index a19b8ab4f..fa20ce983 100755 --- a/tests/du/2g +++ b/tests/du/2g @@ -38,17 +38,14 @@ fail=0 free_kb=`df -kP .|tail -1|sed 's/ [0-9][0-9]*%.*//;s/ *$//;s/.* //'` case "$free_kb" in [0-9]*) ;; - *) echo "invalid size from df: $free_kb" 1>&2; (exit 77); exit 77;; + *) skip_test_ "invalid size from df: $free_kb";; esac # Require about 3GB free. min_kb=3000000 test $min_kb -lt $free_kb || { - echo "$0: skipping this test:" - echo "too little free space on current partition: $free_kb (need $min_kb KB)" \ - 1>&2; - (exit 77); exit 77 + skip_test_ "too little free space on current partition: $free_kb (need $min_kb KB)" } big=big diff --git a/tests/du/8gb b/tests/du/8gb index 29d48c2e0..ab6dedde4 100755 --- a/tests/du/8gb +++ b/tests/du/8gb @@ -27,9 +27,8 @@ fi dd bs=1 seek=8G of=big < /dev/null 2> /dev/null if test $? != 0; then - echo "$0: cannot create a file large enough for this test; possibly" 1>&2 - echo "$0: because file offsets are only 32 bits on this file system" 1>&2 - (exit 77); exit 77 + skip_test_ 'cannot create a file large enough for this test; possibly +because file offsets are only 32 bits on this file system' fi # FIXME: this should be a test of dd. @@ -40,10 +39,9 @@ fi set x `ls -gG big` size=$4 if test "$size" = 0; then - echo "$0: cannot create a file large enough for this test;" 1>&2 - echo "$0: possibly because this system's NFS support is buggy;" 1>&2 - echo "$0: Consider rerunning this test on a different file system." 1>&2 - (exit 77); exit 77 + skip_test_ "cannot create a file large enough for this test +possibly because this system's NFS support is buggy +Consider rerunning this test on a different file system." fi fail=0 diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable index 64c35b9a5..cdc81dc3f 100755 --- a/tests/du/long-from-unreadable +++ b/tests/du/long-from-unreadable @@ -37,11 +37,7 @@ fi proc_file=/proc/self/fd if test ! -d $proc_file; then - cat <<EOF >&2 -$0: Skipping this test. -It would fail, since your system lacks /proc support. -EOF - (exit 77); exit 77 + skip_test_ 'This test would fail, since your system lacks /proc support.' fi dir=`printf '%200s\n' ' '|tr ' ' x` diff --git a/tests/du/long-sloop b/tests/du/long-sloop index f6adf7238..603f1f07f 100755 --- a/tests/du/long-sloop +++ b/tests/du/long-sloop @@ -58,14 +58,9 @@ echo foo > $i # renders it as `Number of symbolic links encountered during path # name traversal exceeds MAXSYMLINKS'. -cat $file > /dev/null 2> err && \ - { - cat <<EOF >&2 -$0: Your system appears to be able to handle more than $n symlinks -in file name resolution, so skipping this test. -EOF - (exit 77); exit 77 - } +cat $file > /dev/null 2> err && + skip_test_ 'Your system appears to be able to handle more than $n symlinks +in file name resolution' too_many=`sed 's/.*: //' err` fail=0 diff --git a/tests/du/slink b/tests/du/slink index e9f7bbd7d..be5a63df5 100755 --- a/tests/du/slink +++ b/tests/du/slink @@ -30,22 +30,19 @@ fi if df --local . >/dev/null 2>&1; then : # Ok. else - echo "$0: skipping this test, since \`.' is on a non-local file system" 1>&2 - (exit 77); exit 77 + skip_test_ "\`.' is on a non-local file system" fi if df --type=xfs . >/dev/null 2>&1; then # At least on Irix-6.5.19, when using an xfs file system, # each created symlink (name lengths up to 255) would have a size of `0'. - echo "$0: skipping this test, since \`.' is on an XFS file system" 1>&2 - (exit 77); exit 77 + skip_test_ "\`.' is on an XFS file system" fi if df --type=nfsv3 . >/dev/null 2>&1; then # At least on OSF/1 4.0d, when using an nfsv3 file system, # each created symlink can end up having a size of 0. - echo "$0: skipping this test, since \`.' is on an NFS file system" 1>&2 - (exit 77); exit 77 + skip_test_ "\`.' is on an NFS file system" fi fail=0 |