1The rcutorture scripting tools automatically create the needed initrd 2directory using dracut. Failing that, this tool will create an initrd 3containing a single statically linked binary named "init" that loops 4over a very long sleep() call. In both cases, this creation is done 5by tools/testing/selftests/rcutorture/bin/mkinitrd.sh. 6 7However, if you are attempting to run rcutorture on a system that does 8not have dracut installed, and if you don't like the notion of static 9linking, you might wish to press an existing initrd into service: 10 11------------------------------------------------------------------------ 12cd tools/testing/selftests/rcutorture 13zcat /initrd.img > /tmp/initrd.img.zcat 14mkdir initrd 15cd initrd 16cpio -id < /tmp/initrd.img.zcat 17# Manually verify that initrd contains needed binaries and libraries. 18------------------------------------------------------------------------ 19 20Interestingly enough, if you are running rcutorture, you don't really 21need userspace in many cases. Running without userspace has the 22advantage of allowing you to test your kernel independently of the 23distro in place, the root-filesystem layout, and so on. To make this 24happen, put the following script in the initrd's tree's "/init" file, 25with 0755 mode. 26 27------------------------------------------------------------------------ 28#!/bin/sh 29 30while : 31do 32 sleep 10 33done 34------------------------------------------------------------------------ 35 36This approach also allows most of the binaries and libraries in the 37initrd filesystem to be dispensed with, which can save significant 38space in rcutorture's "res" directory. 39