X-Git-Url: http://git.annexia.org/?p=qemu-sanity-check.git;a=blobdiff_plain;f=qemu-sanity-check.in;h=5536eda4893d04600cab7b4875b01ad3ea292a5a;hp=4a13b07ba98b72e30f77ce7d0b5f017f25eac3ae;hb=d523f9c2103561bd0b6d2b97e2a6af61f4ab754d;hpb=e8d7a7e5416392babb4f2e68c995dc8555e3d6c1 diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in index 4a13b07..5536eda 100644 --- a/qemu-sanity-check.in +++ b/qemu-sanity-check.in @@ -25,6 +25,7 @@ arch="$(uname -m)" canonical_arch="$(uname -m | sed 's/i[456]86/i386/')" timeout=10m +accel=kvm:tcg # Handle command line parsing. @@ -32,6 +33,7 @@ function usage { echo "qemu-sanity-check [options]" echo "Options:" echo " --help Display this help" + echo " --accel=[kvm|tcg] Force KVM or software emulation" echo " -i|--initrd=initrd Set location of initramfs" echo " -k|--kernel=vmlinuz Set location of kernel" echo " -q|--qemu=qemu Set location of qemu/KVM binary" @@ -43,6 +45,7 @@ function usage { TEMP=$(getopt \ -o i:k:q:t:V \ --long help \ + --long accel: \ --long initrd: \ --long kernel: \ --long qemu: \ @@ -57,6 +60,10 @@ while true; do --help) usage ;; + --accel) + accel="$2" + shift 2 + ;; -i|--initrd) initrd="$2" shift 2 @@ -99,7 +106,7 @@ fi # Locate kernel if not specified. if [ -z "$kernel" ]; then - kernel="$(ls -vr /boot/vmlinuz-*.$arch | head -1)" + kernel="$(ls -1dvr /boot/vmlinuz-*.$arch* 2>/dev/null | grep -v xen | head -1)" if [ -z "$kernel" ]; then echo "$0: cannot find a Linux kernel in /boot" echo "Choose a kernel to test using --kernel=/path/to/vmlinuz" @@ -133,9 +140,12 @@ test_output="$(mktemp --suff=.out)" declare -a argv i=0 argv[$((i++))]="$qemu" -argv[$((i++))]="-nographic" -argv[$((i++))]="-nodefconfig" +argv[$((i++))]="-display" +argv[$((i++))]="none" +argv[$((i++))]="-no-user-config" argv[$((i++))]="-nodefaults" +argv[$((i++))]="-machine" +argv[$((i++))]="accel=$accel" argv[$((i++))]="-no-reboot" argv[$((i++))]="-serial" argv[$((i++))]="file:$test_output" @@ -144,7 +154,7 @@ argv[$((i++))]="$kernel" argv[$((i++))]="-initrd" argv[$((i++))]="$initrd" argv[$((i++))]="-append" -argv[$((i++))]="console=ttyS0 panic=1" +argv[$((i++))]="console=ttyS0 oops=panic panic=-1" #echo "${argv[@]}"