]> xenbits.xensource.com Git - xentesttools/bootstrap.git/commitdiff
add test=[crashme,eatmem] parameters for Linux command line.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 12 Jan 2011 21:54:58 +0000 (16:54 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 12 Jan 2011 21:54:58 +0000 (16:54 -0500)
Either one will start the testcase to start immediately.

root_image/etc/init.d/rcS

index 75b6d588a0dcd040ec22d32cbd909c3735bc983e..6cdbbfd3cf47b38f1d3288034f8fa2e86664abbc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash 
+#!/bin/bash
 
 . /etc/init.d/functions
 
@@ -70,6 +70,8 @@ if [ $? == 1 ]; then
        modprobe evtchn
        modprobe xen_evtchn
        /etc/init.d/xencommons start
+       rm -f /dev/ttyS0
+       ln -s /dev/null /dev/ttyS0
 else
        rm -f /dev/hvc0
        ln -s /dev/null /dev/hvc0
@@ -81,3 +83,17 @@ lsscsi
 lspci
 cat /proc/interrupts
 cat /proc/iomem
+
+
+TEST=$(boot_parameter 'test')
+if [ $? == 0 ]; then
+       echo "Starting $TEST testcase.."
+       case "$TEST" in
+               crashme)
+                       while (true); do crashme +2000 666 100 1:00:00; echo "testing.."; done &
+                       ;;
+               eatmem)
+                       while (true); do eatmem 64MB 10; echo "testing ..";done &
+                       ;;
+       esac
+fi