1d3b1548aSPaul E. McKenney#!/bin/bash 2fef141f6SPaul E. McKenney# SPDX-License-Identifier: GPL-2.0+ 3d3b1548aSPaul E. McKenney# 4d3b1548aSPaul E. McKenney# Run a kvm-based test of the specified tree on the specified configs. 5d3b1548aSPaul E. McKenney# Fully automated run and error checking, no graphics console. 6d3b1548aSPaul E. McKenney# 7d3b1548aSPaul E. McKenney# Execute this in the source tree. Do not run it as a background task 8d3b1548aSPaul E. McKenney# because qemu does not seem to like that much. 9d3b1548aSPaul E. McKenney# 10480b1eb6SPaul E. McKenney# Usage: kvm-test-1-run.sh config builddir resdir seconds qemu-args boot_args 11d3b1548aSPaul E. McKenney# 121b2f48f2SBoqun Feng# qemu-args defaults to "-enable-kvm -nographic", along with arguments 131b2f48f2SBoqun Feng# specifying the number of CPUs and other options 141b2f48f2SBoqun Feng# generated from the underlying CPU architecture. 15d3b1548aSPaul E. McKenney# boot_args defaults to value returned by the per_version_boot_params 16d3b1548aSPaul E. McKenney# shell function. 17d3b1548aSPaul E. McKenney# 18d3b1548aSPaul E. McKenney# Anything you specify for either qemu-args or boot_args is appended to 19d3b1548aSPaul E. McKenney# the default values. The "-smp" value is deduced from the contents of 20d3b1548aSPaul E. McKenney# the config fragment. 21d3b1548aSPaul E. McKenney# 22d3b1548aSPaul E. McKenney# More sophisticated argument parsing is clearly needed. 23d3b1548aSPaul E. McKenney# 24d3b1548aSPaul E. McKenney# Copyright (C) IBM Corporation, 2011 25d3b1548aSPaul E. McKenney# 26fef141f6SPaul E. McKenney# Authors: Paul E. McKenney <paulmck@linux.ibm.com> 27d3b1548aSPaul E. McKenney 28b038c58bSPaul E. McKenneyT=${TMPDIR-/tmp}/kvm-test-1-run.sh.$$ 29d3b1548aSPaul E. McKenneytrap 'rm -rf $T' 0 30d62c9833SPaul E. McKenneymkdir $T 31d3b1548aSPaul E. McKenney 32feef2d28SSeongJae Park. functions.sh 33edae018dSPranith Kumar. $CONFIGFRAG/ver_functions.sh 34d3b1548aSPaul E. McKenney 35d3b1548aSPaul E. McKenneyconfig_template=${1} 36d3b1548aSPaul E. McKenneyconfig_dir=`echo $config_template | sed -e 's,/[^/]*$,,'` 37d3b1548aSPaul E. McKenneytitle=`echo $config_template | sed -e 's/^.*\///'` 38d3b1548aSPaul E. McKenneybuilddir=${2} 39d3b1548aSPaul E. McKenneyresdir=${3} 40d3b1548aSPaul E. McKenneyif test -z "$resdir" -o ! -d "$resdir" -o ! -w "$resdir" 41d3b1548aSPaul E. McKenneythen 42d3b1548aSPaul E. McKenney echo "kvm-test-1-run.sh :$resdir: Not a writable directory, cannot store results into it" 43d3b1548aSPaul E. McKenney exit 1 44d3b1548aSPaul E. McKenneyfi 45d3b1548aSPaul E. McKenneyecho ' ---' `date`: Starting build 46d3b1548aSPaul E. McKenneyecho ' ---' Kconfig fragment at: $config_template >> $resdir/log 47b5744d3cSPaul E. McKenneytouch $resdir/ConfigFragment.input 486be63d7dSPaul E. McKenney 49409670aaSPaul E. McKenney# Combine additional Kconfig options into an existing set such that 50409670aaSPaul E. McKenney# newer options win. The first argument is the Kconfig source ID, the 51409670aaSPaul E. McKenney# second the to-be-updated file within $T, and the third and final the 52409670aaSPaul E. McKenney# list of additional Kconfig options. Note that a $2.tmp file is 53409670aaSPaul E. McKenney# created when doing the update. 546be63d7dSPaul E. McKenneyconfig_override_param () { 55409670aaSPaul E. McKenney if test -n "$3" 566be63d7dSPaul E. McKenney then 57409670aaSPaul E. McKenney echo $3 | sed -e 's/^ *//' -e 's/ *$//' | tr -s " " "\012" > $T/Kconfig_args 586be63d7dSPaul E. McKenney echo " --- $1" >> $resdir/ConfigFragment.input 596be63d7dSPaul E. McKenney cat $T/Kconfig_args >> $resdir/ConfigFragment.input 60409670aaSPaul E. McKenney config_override.sh $T/$2 $T/Kconfig_args > $T/$2.tmp 61409670aaSPaul E. McKenney mv $T/$2.tmp $T/$2 626be63d7dSPaul E. McKenney # Note that "#CHECK#" is not permitted on commandline. 636be63d7dSPaul E. McKenney fi 646be63d7dSPaul E. McKenney} 656be63d7dSPaul E. McKenney 66409670aaSPaul E. McKenneyecho > $T/KcList 67409670aaSPaul E. McKenneyconfig_override_param "$config_dir/CFcommon" KcList "`cat $config_dir/CFcommon 2> /dev/null`" 68409670aaSPaul E. McKenneyconfig_override_param "$config_template" KcList "`cat $config_template 2> /dev/null`" 69b67a9170SPaul E. McKenneyconfig_override_param "--gdb options" KcList "$TORTURE_KCONFIG_GDB_ARG" 7004dbcdb4SPaul E. McKenneyconfig_override_param "--kasan options" KcList "$TORTURE_KCONFIG_KASAN_ARG" 71409670aaSPaul E. McKenneyconfig_override_param "--kcsan options" KcList "$TORTURE_KCONFIG_KCSAN_ARG" 72409670aaSPaul E. McKenneyconfig_override_param "--kconfig argument" KcList "$TORTURE_KCONFIG_ARG" 73409670aaSPaul E. McKenneycp $T/KcList $resdir/ConfigFragment 74d62c9833SPaul E. McKenney 75acc1adf5SPaul E. McKenneybase_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'` 76*a519d214SPaul E. McKenneyif test "$base_resdir" != "$resdir" && test -f $base_resdir/bzImage && test -f $base_resdir/vmlinux 77d3b1548aSPaul E. McKenneythen 78acc1adf5SPaul E. McKenney # Rerunning previous test, so use that test's kernel. 79acc1adf5SPaul E. McKenney QEMU="`identify_qemu $base_resdir/vmlinux`" 801b900c6aSBoqun Feng BOOT_IMAGE="`identify_boot_image $QEMU`" 811b900c6aSBoqun Feng KERNEL=$base_resdir/${BOOT_IMAGE##*/} # use the last component of ${BOOT_IMAGE} 82acc1adf5SPaul E. McKenney ln -s $base_resdir/Make*.out $resdir # for kvm-recheck.sh 83acc1adf5SPaul E. McKenney ln -s $base_resdir/.config $resdir # for kvm-recheck.sh 8485ef2bd2SPaul E. McKenney # Arch-independent indicator 8585ef2bd2SPaul E. McKenney touch $resdir/builtkernel 86*a519d214SPaul E. McKenneyelif test "$base_resdir" != "$resdir" 87*a519d214SPaul E. McKenneythen 88*a519d214SPaul E. McKenney # Rerunning previous test for which build failed 89*a519d214SPaul E. McKenney ln -s $base_resdir/Make*.out $resdir # for kvm-recheck.sh 90*a519d214SPaul E. McKenney ln -s $base_resdir/.config $resdir # for kvm-recheck.sh 91*a519d214SPaul E. McKenney echo Initial build failed, not running KVM, see $resdir. 92*a519d214SPaul E. McKenney if test -f $builddir.wait 93*a519d214SPaul E. McKenney then 94*a519d214SPaul E. McKenney mv $builddir.wait $builddir.ready 95*a519d214SPaul E. McKenney fi 96*a519d214SPaul E. McKenney exit 1 97409670aaSPaul E. McKenneyelif kvm-build.sh $T/KcList $resdir 98acc1adf5SPaul E. McKenneythen 99acc1adf5SPaul E. McKenney # Had to build a kernel for this test. 1006dc82595SPaul E. McKenney QEMU="`identify_qemu vmlinux`" 101f189cc8cSPaul E. McKenney BOOT_IMAGE="`identify_boot_image $QEMU`" 1026dc82595SPaul E. McKenney cp vmlinux $resdir 1036dc82595SPaul E. McKenney cp .config $resdir 1046dc82595SPaul E. McKenney cp Module.symvers $resdir > /dev/null || : 1056dc82595SPaul E. McKenney cp System.map $resdir > /dev/null || : 106f189cc8cSPaul E. McKenney if test -n "$BOOT_IMAGE" 107f189cc8cSPaul E. McKenney then 1086dc82595SPaul E. McKenney cp $BOOT_IMAGE $resdir 1091b900c6aSBoqun Feng KERNEL=$resdir/${BOOT_IMAGE##*/} 11085ef2bd2SPaul E. McKenney # Arch-independent indicator 11185ef2bd2SPaul E. McKenney touch $resdir/builtkernel 112f189cc8cSPaul E. McKenney else 113f189cc8cSPaul E. McKenney echo No identifiable boot image, not running KVM, see $resdir. 114f189cc8cSPaul E. McKenney echo Do the torture scripts know about your architecture? 115f189cc8cSPaul E. McKenney fi 116d3b1548aSPaul E. McKenney parse-build.sh $resdir/Make.out $title 117d3b1548aSPaul E. McKenneyelse 118acc1adf5SPaul E. McKenney # Build failed. 1196dc82595SPaul E. McKenney cp .config $resdir || : 120d3b1548aSPaul E. McKenney echo Build failed, not running KVM, see $resdir. 121d3b1548aSPaul E. McKenney if test -f $builddir.wait 122d3b1548aSPaul E. McKenney then 123d3b1548aSPaul E. McKenney mv $builddir.wait $builddir.ready 124d3b1548aSPaul E. McKenney fi 125d3b1548aSPaul E. McKenney exit 1 126d3b1548aSPaul E. McKenneyfi 127acc1adf5SPaul E. McKenneyif test -f $builddir.wait 128acc1adf5SPaul E. McKenneythen 129acc1adf5SPaul E. McKenney mv $builddir.wait $builddir.ready 130acc1adf5SPaul E. McKenneyfi 131d3b1548aSPaul E. McKenneywhile test -f $builddir.ready 132d3b1548aSPaul E. McKenneydo 133d3b1548aSPaul E. McKenney sleep 1 134d3b1548aSPaul E. McKenneydone 135480b1eb6SPaul E. McKenneyseconds=$4 136d3b1548aSPaul E. McKenneyqemu_args=$5 137d3b1548aSPaul E. McKenneyboot_args=$6 138d3b1548aSPaul E. McKenney 1399bee2c6fSPaul E. McKenneyif test -z "$TORTURE_BUILDONLY" 1409bee2c6fSPaul E. McKenneythen 141d3b1548aSPaul E. McKenney echo ' ---' `date`: Starting kernel 1429bee2c6fSPaul E. McKenneyfi 143d3b1548aSPaul E. McKenney 144d3b1548aSPaul E. McKenney# Generate -smp qemu argument. 1451b2f48f2SBoqun Fengqemu_args="-enable-kvm -nographic $qemu_args" 146d62c9833SPaul E. McKenneycpu_count=`configNR_CPUS.sh $resdir/ConfigFragment` 147ae867ff0SPaul E. McKenneycpu_count=`configfrag_boot_cpus "$boot_args" "$config_template" "$cpu_count"` 148b22eb7ceSPaul E. McKenneyif test "$cpu_count" -gt "$TORTURE_ALLOTED_CPUS" 149d3b1548aSPaul E. McKenneythen 150b22eb7ceSPaul E. McKenney echo CPU count limited from $cpu_count to $TORTURE_ALLOTED_CPUS | tee -a $resdir/Warnings 151b22eb7ceSPaul E. McKenney cpu_count=$TORTURE_ALLOTED_CPUS 152d3b1548aSPaul E. McKenneyfi 153d3b1548aSPaul E. McKenneyqemu_args="`specify_qemu_cpus "$QEMU" "$qemu_args" "$cpu_count"`" 15488513ae5SPaul E. McKenneyqemu_args="`specify_qemu_net "$qemu_args"`" 155d3b1548aSPaul E. McKenney 156d3b1548aSPaul E. McKenney# Generate architecture-specific and interaction-specific qemu arguments 157c979ff99SPaul E. McKenneyqemu_args="$qemu_args `identify_qemu_args "$QEMU" "$resdir/console.log"`" 158d3b1548aSPaul E. McKenney 159d3b1548aSPaul E. McKenney# Generate qemu -append arguments 160d3b1548aSPaul E. McKenneyqemu_append="`identify_qemu_append "$QEMU"`" 161d3b1548aSPaul E. McKenney 162d3b1548aSPaul E. McKenney# Pull in Kconfig-fragment boot parameters 163d3b1548aSPaul E. McKenneyboot_args="`configfrag_boot_params "$boot_args" "$config_template"`" 164d3b1548aSPaul E. McKenney# Generate kernel-version-specific boot parameters 1656bb7ff17SPaul E. McKenneyboot_args="`per_version_boot_params "$boot_args" $resdir/.config $seconds`" 166b67a9170SPaul E. McKenneyif test -n "$TORTURE_BOOT_GDB_ARG" 167b67a9170SPaul E. McKenneythen 168b67a9170SPaul E. McKenney boot_args="$boot_args $TORTURE_BOOT_GDB_ARG" 169b67a9170SPaul E. McKenneyfi 170b67a9170SPaul E. McKenneyecho $QEMU $qemu_args -m $TORTURE_QEMU_MEM -kernel $KERNEL -append \"$qemu_append $boot_args\" $TORTURE_QEMU_GDB_ARG > $resdir/qemu-cmd 171315957caSPaul E. McKenneyecho "# TORTURE_SHUTDOWN_GRACE=$TORTURE_SHUTDOWN_GRACE" >> $resdir/qemu-cmd 172315957caSPaul E. McKenneyecho "# seconds=$seconds" >> $resdir/qemu-cmd 173d3b1548aSPaul E. McKenney 174805ffee2SPaul E. McKenneyif test -n "$TORTURE_BUILDONLY" 175d3b1548aSPaul E. McKenneythen 176d3b1548aSPaul E. McKenney echo Build-only run specified, boot/test omitted. 1779bee2c6fSPaul E. McKenney touch $resdir/buildonly 178d3b1548aSPaul E. McKenney exit 0 179d3b1548aSPaul E. McKenneyfi 180316db589SPaul E. McKenney 181316db589SPaul E. McKenney# Decorate qemu-cmd with redirection, backgrounding, and PID capture 182316db589SPaul E. McKenneysed -e 's/$/ 2>\&1 \&/' < $resdir/qemu-cmd > $T/qemu-cmd 183316db589SPaul E. McKenneyecho 'echo $! > $resdir/qemu_pid' >> $T/qemu-cmd 184316db589SPaul E. McKenney 185316db589SPaul E. McKenney# In case qemu refuses to run... 186c979ff99SPaul E. McKenneyecho "NOTE: $QEMU either did not run or was interactive" > $resdir/console.log 187316db589SPaul E. McKenney 188316db589SPaul E. McKenney# Attempt to run qemu 189315957caSPaul E. McKenneykstarttime=`gawk 'BEGIN { print systime() }' < /dev/null` 190316db589SPaul E. McKenney( . $T/qemu-cmd; wait `cat $resdir/qemu_pid`; echo $? > $resdir/qemu-retval ) & 191d3b1548aSPaul E. McKenneycommandcompleted=0 192b67a9170SPaul E. McKenneyif test -z "$TORTURE_KCONFIG_GDB_ARG" 193b67a9170SPaul E. McKenneythen 194fb2c66afSPaul E. McKenney sleep 10 # Give qemu's pid a chance to reach the file 195fb2c66afSPaul E. McKenney if test -s "$resdir/qemu_pid" 196fb2c66afSPaul E. McKenney then 197fb2c66afSPaul E. McKenney qemu_pid=`cat "$resdir/qemu_pid"` 198d3b1548aSPaul E. McKenney echo Monitoring qemu job at pid $qemu_pid 199fb2c66afSPaul E. McKenney else 200fb2c66afSPaul E. McKenney qemu_pid="" 201fb2c66afSPaul E. McKenney echo Monitoring qemu job at yet-as-unknown pid 202fb2c66afSPaul E. McKenney fi 203b67a9170SPaul E. McKenneyfi 204b67a9170SPaul E. McKenneyif test -n "$TORTURE_KCONFIG_GDB_ARG" 205b67a9170SPaul E. McKenneythen 206b67a9170SPaul E. McKenney echo Waiting for you to attach a debug session, for example: > /dev/tty 207b67a9170SPaul E. McKenney echo " gdb $base_resdir/vmlinux" > /dev/tty 208b67a9170SPaul E. McKenney echo 'After symbols load and the "(gdb)" prompt appears:' > /dev/tty 209b67a9170SPaul E. McKenney echo " target remote :1234" > /dev/tty 210b67a9170SPaul E. McKenney echo " continue" > /dev/tty 211b67a9170SPaul E. McKenney kstarttime=`gawk 'BEGIN { print systime() }' < /dev/null` 212b67a9170SPaul E. McKenneyfi 2130bca7c33SPaul E. McKenneywhile : 214d3b1548aSPaul E. McKenneydo 215fb2c66afSPaul E. McKenney if test -z "$qemu_pid" -a -s "$resdir/qemu_pid" 216fb2c66afSPaul E. McKenney then 217fb2c66afSPaul E. McKenney qemu_pid=`cat "$resdir/qemu_pid"` 218fb2c66afSPaul E. McKenney fi 219c493f1c9SPaul E. McKenney kruntime=`gawk 'BEGIN { print systime() - '"$kstarttime"' }' < /dev/null` 220fb2c66afSPaul E. McKenney if test -z "$qemu_pid" || kill -0 "$qemu_pid" > /dev/null 2>&1 221d3b1548aSPaul E. McKenney then 22208c79742SPaul E. McKenney if test -n "$TORTURE_KCONFIG_GDB_ARG" 22308c79742SPaul E. McKenney then 22408c79742SPaul E. McKenney : 225c821f855SPaul E. McKenney elif test $kruntime -ge $seconds || test -f "$resdir/../STOP.1" 2260bca7c33SPaul E. McKenney then 2270bca7c33SPaul E. McKenney break; 2280bca7c33SPaul E. McKenney fi 229d3b1548aSPaul E. McKenney sleep 1 230d3b1548aSPaul E. McKenney else 231d3b1548aSPaul E. McKenney commandcompleted=1 232d3b1548aSPaul E. McKenney if test $kruntime -lt $seconds 233d3b1548aSPaul E. McKenney then 234d3b1548aSPaul E. McKenney echo Completed in $kruntime vs. $seconds >> $resdir/Warnings 2>&1 235fff35c4eSPaul E. McKenney grep "^(qemu) qemu:" $resdir/kvm-test-1-run.sh.out >> $resdir/Warnings 2>&1 236fff35c4eSPaul E. McKenney killpid="`sed -n "s/^(qemu) qemu: terminating on signal [0-9]* from pid \([0-9]*\).*$/\1/p" $resdir/Warnings`" 237fff35c4eSPaul E. McKenney if test -n "$killpid" 238fff35c4eSPaul E. McKenney then 239fff35c4eSPaul E. McKenney echo "ps -fp $killpid" >> $resdir/Warnings 2>&1 240fff35c4eSPaul E. McKenney ps -fp $killpid >> $resdir/Warnings 2>&1 241fff35c4eSPaul E. McKenney fi 242c64659efSPaul E. McKenney # Reduce probability of PID reuse by allowing a one-minute buffer 243c64659efSPaul E. McKenney if test $((kruntime + 60)) -lt $seconds && test -s "$resdir/../jitter_pids" 244c64659efSPaul E. McKenney then 245c64659efSPaul E. McKenney awk < "$resdir/../jitter_pids" ' 246c64659efSPaul E. McKenney NF > 0 { 247c64659efSPaul E. McKenney pidlist = pidlist " " $1; 248c64659efSPaul E. McKenney n++; 249c64659efSPaul E. McKenney } 250c64659efSPaul E. McKenney END { 251c64659efSPaul E. McKenney if (n > 0) { 252c64659efSPaul E. McKenney print "kill " pidlist; 253c64659efSPaul E. McKenney } 254c64659efSPaul E. McKenney }' | sh 255c64659efSPaul E. McKenney fi 256d3b1548aSPaul E. McKenney else 257fb2c66afSPaul E. McKenney echo ' ---' `date`: "Kernel done" 258d3b1548aSPaul E. McKenney fi 259d3b1548aSPaul E. McKenney break 260d3b1548aSPaul E. McKenney fi 261d3b1548aSPaul E. McKenneydone 262fb2c66afSPaul E. McKenneyif test -z "$qemu_pid" -a -s "$resdir/qemu_pid" 263fb2c66afSPaul E. McKenneythen 264fb2c66afSPaul E. McKenney qemu_pid=`cat "$resdir/qemu_pid"` 265fb2c66afSPaul E. McKenneyfi 266fb2c66afSPaul E. McKenneyif test $commandcompleted -eq 0 -a -n "$qemu_pid" 267d3b1548aSPaul E. McKenneythen 268c821f855SPaul E. McKenney if ! test -f "$resdir/../STOP.1" 2696387ecbcSPaul E. McKenney then 270d3b1548aSPaul E. McKenney echo Grace period for qemu job at pid $qemu_pid 2716387ecbcSPaul E. McKenney fi 2726e8c66c8SPaul E. McKenney oldline="`tail $resdir/console.log`" 2730bca7c33SPaul E. McKenney while : 274d3b1548aSPaul E. McKenney do 275c821f855SPaul E. McKenney if test -f "$resdir/../STOP.1" 2766387ecbcSPaul E. McKenney then 277c821f855SPaul E. McKenney echo "PID $qemu_pid killed due to run STOP.1 request" >> $resdir/Warnings 2>&1 2786387ecbcSPaul E. McKenney kill -KILL $qemu_pid 2796387ecbcSPaul E. McKenney break 2806387ecbcSPaul E. McKenney fi 281c493f1c9SPaul E. McKenney kruntime=`gawk 'BEGIN { print systime() - '"$kstarttime"' }' < /dev/null` 282d3b1548aSPaul E. McKenney if kill -0 $qemu_pid > /dev/null 2>&1 283d3b1548aSPaul E. McKenney then 2840bca7c33SPaul E. McKenney : 285d3b1548aSPaul E. McKenney else 286d3b1548aSPaul E. McKenney break 287d3b1548aSPaul E. McKenney fi 2886e8c66c8SPaul E. McKenney must_continue=no 2896e8c66c8SPaul E. McKenney newline="`tail $resdir/console.log`" 2906e8c66c8SPaul E. McKenney if test "$newline" != "$oldline" && echo $newline | grep -q ' [0-9]\+us : ' 2916e8c66c8SPaul E. McKenney then 2926e8c66c8SPaul E. McKenney must_continue=yes 2936e8c66c8SPaul E. McKenney fi 2946e8c66c8SPaul E. McKenney last_ts="`tail $resdir/console.log | grep '^\[ *[0-9]\+\.[0-9]\+]' | tail -1 | sed -e 's/^\[ *//' -e 's/\..*$//'`" 2952c667e5eSPaul E. McKenney if test -z "$last_ts" 2966e8c66c8SPaul E. McKenney then 2976e8c66c8SPaul E. McKenney last_ts=0 2986e8c66c8SPaul E. McKenney fi 2996e8c66c8SPaul E. McKenney if test "$newline" != "$oldline" -a "$last_ts" -lt $((seconds + $TORTURE_SHUTDOWN_GRACE)) 3006e8c66c8SPaul E. McKenney then 3016e8c66c8SPaul E. McKenney must_continue=yes 3026e8c66c8SPaul E. McKenney fi 3036e8c66c8SPaul E. McKenney if test $must_continue = no -a $kruntime -ge $((seconds + $TORTURE_SHUTDOWN_GRACE)) 304d3b1548aSPaul E. McKenney then 305b7659241SPaul E. McKenney echo "!!! PID $qemu_pid hung at $kruntime vs. $seconds seconds" >> $resdir/Warnings 2>&1 306d3b1548aSPaul E. McKenney kill -KILL $qemu_pid 3070bca7c33SPaul E. McKenney break 308d3b1548aSPaul E. McKenney fi 3096e8c66c8SPaul E. McKenney oldline=$newline 3106e8c66c8SPaul E. McKenney sleep 10 311d3b1548aSPaul E. McKenney done 312fb2c66afSPaul E. McKenneyelif test -z "$qemu_pid" 313fb2c66afSPaul E. McKenneythen 314fb2c66afSPaul E. McKenney echo Unknown PID, cannot kill qemu command 315d3b1548aSPaul E. McKenneyfi 316d3b1548aSPaul E. McKenney 317d3b1548aSPaul E. McKenneyparse-console.sh $resdir/console.log $title 318