summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/rcutorture/bin/configcheck.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/configcheck.sh
parent50527f7cd051b7d701bb5797b958d8fd4486cdcd (diff)
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/configcheck.sh')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/configcheck.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/configcheck.sh b/tools/testing/selftests/rcutorture/bin/configcheck.sh
index 31584cee84d7..83fac1852ab2 100755
--- a/tools/testing/selftests/rcutorture/bin/configcheck.sh
+++ b/tools/testing/selftests/rcutorture/bin/configcheck.sh
@@ -7,9 +7,8 @@
#
# Authors: Paul E. McKenney <paulmck@linux.ibm.com>
-T=${TMPDIR-/tmp}/abat-chk-config.sh.$$
+T="`mktemp -d ${TMPDIR-/tmp}/configcheck.sh.XXXXXX`"
trap 'rm -rf $T' 0
-mkdir $T
cat $1 > $T/.config