diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-19 07:26:18 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-19 07:26:18 +0000 |
commit | a8f2520b15ab992378efc4250cd770f5ab0facf4 (patch) | |
tree | b0671b322a156118e83dbd4dd562f348941e92c9 /tests | |
parent | f55ce3a2dc1e1ce01f9c3a3a5ab1b3dc877d540e (diff) | |
download | coreutils-a8f2520b15ab992378efc4250cd770f5ab0facf4.tar.xz |
Use test -p to test for fifos, rather
than the (incorrect) test -f and the (inadequate) ls. ls is
inadequate because on some hosts a buggy mv will create a file of
the wrong type (problem reported by Eric Blake). Skip this test
if test -p doesn't work.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/mv/mv-special-1 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1 index 7c7d05c22..894d3562c 100755 --- a/tests/mv/mv-special-1 +++ b/tests/mv/mv-special-1 @@ -27,6 +27,7 @@ mkdir $tmp || framework_failure=1 cd $tmp || framework_failure=1 rm -f $null || framework_failure=1 mknod $null p || framework_failure=1 +test -p $null || framework_failure=1 mkdir -p $dir/a/b/c $dir/d/e/f || framework_failure=1 touch $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure=1 @@ -43,11 +44,10 @@ fi fail=0 mv --verbose $null $dir $other_partition_tmpdir > out || fail=1 # Make sure the files are gone. -test -f $null && fail=1 +test -p $null && fail=1 test -d $dir && fail=1 # Make sure they were moved. -# Since `test -e' is not portable, use `ls'. -ls $other_partition_tmpdir/$null > /dev/null || fail=1 +test -p $other_partition_tmpdir/$null || fail=1 test -d $other_partition_tmpdir/$dir/a/b/c || fail=1 # POSIX says rename (A, B) can succeed if A and B are on different file systems, |