]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
rcutorture/kvm-recheck-*: Improve result directory readability check
authorSeongJae Park <sj38.park@gmail.com>
Fri, 3 Nov 2017 10:17:25 +0000 (19:17 +0900)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 11 Dec 2017 17:18:25 +0000 (09:18 -0800)
The kvm-recheck-(lock|rcu|rcuperf).sh scripts check whether the
user-specified results directory exists.  If not, it prints out error
message that says the specified directory is unreadable.  To make the
message more precise, this commit adds a readability check.

Fixes: 2193e1604eac ("rcutorture: Abstract kvm-recheck.sh")
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh
tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh

index 43f764098e508fc048bb97aed3bb7247e11275bb..2de92f43ee8c2f819978b3a8ce4ccbb2ec4345fc 100755 (executable)
@@ -23,7 +23,7 @@
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 i="$1"
-if test -d $i
+if test -d "$i" -a -r "$i"
 then
        :
 else
index 559e01ac86be9731cf9040d682132869f42d3ec9..9e34656bf659f3a139f549e041d012089abb81f0 100755 (executable)
@@ -23,7 +23,7 @@
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 i="$1"
-if test -d $i
+if test -d "$i" -a -r "$i"
 then
        :
 else
index 8f3121afc716d4d5e0295b501d76bb9e662d76d8..6138fd94abfe8c9faae3163cfc61b78b87b9cc77 100755 (executable)
@@ -23,7 +23,7 @@
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 i="$1"
-if test -d $i
+if test -d "$i" -a -r "$i"
 then
        :
 else