From: Konrad Rzeszutek Wilk Date: Tue, 29 Apr 2014 13:50:32 +0000 (-0400) Subject: isolinux/rcS: Add 'test=cpu-low' and 'test=cpu-high' test-cases X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8ca734b58f8308909f67e9d6e9454f36dae2f44d;p=xentesttools%2Fbootstrap.git isolinux/rcS: Add 'test=cpu-low' and 'test=cpu-high' test-cases The first will consume one CPU by spinning around and doing md5sum of the memory. The later will do this on all of the CPUs. Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/boot/isolinux/isolinux.cfg b/boot/isolinux/isolinux.cfg index dc3bf2d..50ca10e 100755 --- a/boot/isolinux/isolinux.cfg +++ b/boot/isolinux/isolinux.cfg @@ -10,6 +10,17 @@ LABEL Network test KERNEL vmlinuz APPEND initrd=initramf.gz console=ttyS0,115200 test=net nofb +LABEL One-CPU burn + MENU LABEL One-CPU + KERNEL vmlinuz + APPEND initrd=initramf.gz console=ttyS0,115200 test=cpu-low nofb + +LABEL All-CPU burn + MENU LABEL All-CPU + KERNEL vmlinuz + APPEND initrd=initramf.gz console=ttyS0,115200 test=cpu-high nofb + + LABEL Static Network test MENU LABEL Static Network test KERNEL vmlinuz diff --git a/root_image/etc/init.d/rcS b/root_image/etc/init.d/rcS index 17ced11..e890ef9 100755 --- a/root_image/etc/init.d/rcS +++ b/root_image/etc/init.d/rcS @@ -147,6 +147,20 @@ if [ $? == 0 ]; then while (true); do dfbtest_fillrect; done & NOFB="yes" ;; + cpu-low) + while (true); do md5sum /dev/mem; done & + ;; + cpu-high) + echo -n "Launching CPU burners for $NR_CPUS" + for cpu in `seq 1 $NR_CPUS` + do + echo "while (true); do md5sum /dev/mem; done" > /tmp/cpu$cpu + chmod 755 /tmp/cpu$cpu + echo -n "." + nohup bash /tmp/cpu$cpu 1>/dev/null 2>/dev/null & + done + echo "done!" + ;; net) netserver & iperf -s -D -w 256000 &