summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/kvm.sh
diff options
context:
space:
mode:
authorConnor Shu <Connor.Shu@ibm.com>2018-08-22 14:16:46 -0700
committerPaul E. McKenney <paulmck@linux.ibm.com>2018-11-08 21:52:55 -0800
commit8f15c682ac5a778feb8e343f9057b89beb40d85b (patch)
treebb489e8004913e28d397c2d016c9d3bf5c62ddbd /tools/testing/selftests/rcutorture/bin/kvm.sh
parent651022382c7f8da46cb4872a545ee1da6d097d2a (diff)
downloadtalos-op-linux-8f15c682ac5a778feb8e343f9057b89beb40d85b.tar.gz
talos-op-linux-8f15c682ac5a778feb8e343f9057b89beb40d85b.zip
rcutorture: Automatically create initrd directory
The rcutorture scripts currently expect the user to create the tools/testing/selftests/rcutorture/initrd directory. Should the user fail to do this, the kernel build will fail with obscure and confusing error messages. This commit therefore adds explicit checks for the tools/testing/selftests/rcutorture/initrd directory, and if not present, creates one on systems on which dracut is installed. If this directory could not be created, a less obscure error message is emitted and the test is aborted. Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Connor Shu <Connor.Shu@ibm.com> [ paulmck: Adapt the script to fit into the rcutorture framework and severely abbreviate the initrd/init script. ] Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/kvm.sh')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 5a7a62d76a50..19864f1cb27a 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -194,6 +194,14 @@ do
shift
done
+if test -z "$TORTURE_INITRD" || tools/testing/selftests/rcutorture/bin/mkinitrd.sh
+then
+ :
+else
+ echo No initrd and unable to create one, aborting test >&2
+ exit 1
+fi
+
CONFIGFRAG=${KVM}/configs/${TORTURE_SUITE}; export CONFIGFRAG
if test -z "$configs"
OpenPOWER on IntegriCloud