diff options
author | Jim Meyering <meyering@redhat.com> | 2011-01-28 19:23:21 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-01-28 23:19:45 +0100 |
commit | 68a734d66bbe72d5d4133c386fa77069dd77fb8c (patch) | |
tree | 41bee2c43451851d824930d5ebb96f04d7e40186 /tests/cp | |
parent | 034e496e983d286011fa5f6058b541b163ba9afd (diff) | |
download | coreutils-68a734d66bbe72d5d4133c386fa77069dd77fb8c.tar.xz |
tests: remove obsolete uses of "$$" in temporary file names
Those were useful when tests might have been run in the same
directory and in parallel. Now, each test is run in a newly-
created empty directory.
* tests/cp/backup-1: Remove obsolete uses of "$$".
* tests/cp/same-file: Likewise.
* tests/dd/misc: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/to-symlink: Likewise.
* tests/touch/fail-diag: Likewise.
Diffstat (limited to 'tests/cp')
-rwxr-xr-x | tests/cp/backup-1 | 4 | ||||
-rwxr-xr-x | tests/cp/same-file | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1 index a3ed9c37b..34670bd1b 100755 --- a/tests/cp/backup-1 +++ b/tests/cp/backup-1 @@ -21,10 +21,8 @@ print_ver_ cp suffix=.b -file=b1.$$ +file=F file_backup="$file$suffix" -temp_files="$file $file_backup" -rm -f $temp_files echo test > $file || fail=1 diff --git a/tests/cp/same-file b/tests/cp/same-file index 7bb605a36..da4fce3d0 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -39,10 +39,7 @@ test $hard_link_to_symlink_does_the_deref = yes \ && remove_these_sed='/^0 -[bf]*l .*sl1 ->/d' \ || remove_these_sed='/^ELIDE NO TEST OUTPUT/d' -actual=actual-$$ -expected=expected-$$ - -exec 3>&1 1> $actual +exec 3>&1 1> actual # FIXME: This should be bigger: like more than 8k contents=XYZ @@ -130,7 +127,7 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do echo done -cat <<\EOF | sed "$remove_these_sed" > $expected +cat <<\EOF | sed "$remove_these_sed" > expected 1 [cp: `foo' and `symlink' are the same file] (foo symlink -> foo) 1 -d [cp: `foo' and `symlink' are the same file] (foo symlink -> foo) 1 -f [cp: `foo' and `symlink' are the same file] (foo symlink -> foo) @@ -218,6 +215,6 @@ EOF exec 1>&3 3>&- -compare $expected $actual 1>&2 || fail=1 +compare expected actual 1>&2 || fail=1 Exit $fail |