rcutorture: Automatically create initrd directory
authorConnor Shu <Connor.Shu@ibm.com>
Wed, 22 Aug 2018 21:16:46 +0000 (14:16 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Fri, 9 Nov 2018 05:52:55 +0000 (21:52 -0800)
commit8f15c682ac5a778feb8e343f9057b89beb40d85b
treebb489e8004913e28d397c2d016c9d3bf5c62ddbd
parent651022382c7f8da46cb4872a545ee1da6d097d2a
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>
tools/testing/selftests/rcutorture/bin/kvm.sh
tools/testing/selftests/rcutorture/bin/mkinitrd.sh [new file with mode: 0755]