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/mv | |
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/mv')
-rwxr-xr-x | tests/mv/part-symlink | 9 | ||||
-rwxr-xr-x | tests/mv/to-symlink | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink index de8ece0bb..ec523b893 100755 --- a/tests/mv/part-symlink +++ b/tests/mv/part-symlink @@ -45,10 +45,7 @@ pwd_tmp=`pwd` # Exercise those four cases for each of # cp and mv, with lots of combinations of options. -actual=actual-$$ -expected=expected-$$ - -exec 1> $actual +exec 1> actual # FIXME: This should be bigger: like more than 8k contents=XYZ @@ -153,7 +150,7 @@ done test $fail = 1 && { (exit 1); exit; } -cat <<\EOF > $expected +cat <<\EOF > expected 1 cp loc_reg rem_sl [cp: `loc_reg' and `rem_sl' are the same file] (loc_reg) (rem_sl -> dir/loc_reg) @@ -259,6 +256,6 @@ cat <<\EOF > $expected EOF # Redirect to stderr, since stdout is already taken. -compare $expected $actual 1>&2 || fail=1 +compare expected actual 1>&2 || fail=1 Exit $fail diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink index ffc291cd5..600fde35f 100755 --- a/tests/mv/to-symlink +++ b/tests/mv/to-symlink @@ -24,10 +24,8 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; } rem_file="$other_partition_tmpdir/file" rem_symlink="$other_partition_tmpdir/symlink" -file=to-sym-$$ +file=to-sym - -rm -f $file || framework_failure echo local > $file || framework_failure echo remote > $rem_file || framework_failure ln -s $rem_file $rem_symlink || framework_failure |