aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/rcutorture/bin/kvm.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2022-08-27 07:16:27 -0700
committerPaul E. McKenney <paulmck@kernel.org>2022-10-18 15:02:59 -0700
commitc211ae9ce424793a24cac346ee73613965a40646 (patch)
tree005ddd68f7a13139c09ebf35d6237acb08633438 /tools/testing/selftests/rcutorture/bin/kvm.sh
parentrcutorture: Add --bootargs parameter to kvm-again.sh (diff)
downloadwireguard-linux-c211ae9ce424793a24cac346ee73613965a40646.tar.xz
wireguard-linux-c211ae9ce424793a24cac346ee73613965a40646.zip
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-xtools/testing/selftests/rcutorture/bin/kvm.sh3
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`/../../../../../