From 0229bbb6c7c3c7f2d83d66272e9ab5d00d8a6875 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Wed, 12 Jan 2011 16:54:58 -0500 Subject: [PATCH] add test=[crashme,eatmem] parameters for Linux command line. Either one will start the testcase to start immediately. --- root_image/etc/init.d/rcS | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/root_image/etc/init.d/rcS b/root_image/etc/init.d/rcS index 75b6d58..6cdbbfd 100755 --- a/root_image/etc/init.d/rcS +++ b/root_image/etc/init.d/rcS @@ -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 -- 2.39.5