diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2022-08-27 07:16:27 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2022-10-18 15:02:59 -0700 |
commit | c211ae9ce424793a24cac346ee73613965a40646 (patch) | |
tree | 005ddd68f7a13139c09ebf35d6237acb08633438 /tools/testing/selftests/rcutorture/bin/kvm.sh | |
parent | 50527f7cd051b7d701bb5797b958d8fd4486cdcd (diff) | |
download | linux-stable-c211ae9ce424793a24cac346ee73613965a40646.tar.gz |
torture: Use mktemp instead of guessing at unique names
This commit drags the rcutorture scripting kicking and screaming into the
twenty-first century by making use of the BSD-derived mktemp command to
create temporary files and directories. In happy contrast to many of its
ill-behaved predecessors, mktemp seems to actually work reasonably reliably!
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/kvm.sh')
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 6c734818a875..7710b1e1cdda 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -14,9 +14,8 @@ scriptname=$0 args="$*" -T=${TMPDIR-/tmp}/kvm.sh.$$ +T="`mktemp -d ${TMPDIR-/tmp}/kvm.sh.XXXXXX`" trap 'rm -rf $T' 0 -mkdir $T cd `dirname $scriptname`/../../../../../ |