* new `timeout=' option on `execute' virt server command.
* set some default timeouts (these should be settable with options,
really).
+ * Default kernel image guesser is more sophisticated - now we look
+ for something that looks like a Xen kernel rather than guessing
+ from the filename since the filenames seem unstable.
- -- Ian Jackson <iwj@ubuntu.com> Fri, 23 Mar 2007 16:58:42 +0000
+ --
autopkgtest (0.7.2) feisty; urgency=low
---------- Items that are likely to need attention ----------
-adt_kernel the booted kernel file /boot/xen*`uname -r`
+adt_kernel Xen kernel matching /boot/xen*`uname -r`
Kernel to boot in the testbed image
-adt_ramdisk <kernel>.initrd.img
+adt_ramdisk initrd.img-* where <kernel> is vmlinuz-*
Initial ramdisk to provide to the testbid image.
"none" means do not provide an initial ramdisk.
;;
esac
-case "$adt_kernel" in
-'')
+if [ "$adt_readconfig_needkernel" ]; then
+ case "$adt_kernel" in
+ '')
printf "searching for kernel ... "
- for f in /boot/xen*"`uname -r`"; do
+ for f in /boot/*"`uname -r`"*; do
test -e "$f" || continue
+ printf "(%s:" "$f"
+ output="$(file -- "$f")"
+ case "$output" in
+ *"gzip compressed data"*) ;;
+ *) printf "!gzip) "; continue ;;
+ esac
+ trap 'rm -f -- "$tf"; exit 127' 0
+ tf=`mktemp -t`
+ zcat -- "$f" >"$tf"
+ output="$(file -- "$tf")"
+ case "$output" in
+ *"ELF "*" executable,"*) ;;
+ *) printf "!ELF) "; continue;;
+ esac
+ output="$(objdump -j __xen_guest -s -- "$tf")"
+ rm -f "$tf"; trap '' 0
+ case "$output" in
+ *" __xen_guest:"*) ;;
+ *) printf "!Xen) "; continue
+ esac
+ printf "y) "
test "x$adt_kernel" = x || \
fail 'several kernels, config must specify which'
adt_kernel="$f"
done
+ [ "x$adt_kernel" != x ] || \
+ fail 'could not find currently booted Xen kernel'
echo "using currently booted kernel: $adt_kernel"
;;
-esac
+ esac
-case "$adt_ramdisk" in
-none) echo "ramdisk \`none' specified, using static kernel"
+ case "$adt_ramdisk" in
+ none) echo "ramdisk \`none' specified, using static kernel"
adt_ramdisk='' ;;
-'') adt_ramdisk="$adt_kernel.initrd.img"
- echo "using default ramdisk <kernel>.initrd.img: $adt_ramdisk" ;;
-*) ;;
-esac
+ '') adt_ramdisk="${adt_kernel/\/vmlinuz-//initrd.img-}"
+ test -e "$adt_ramdisk" || \
+ fail "calculated default ramdisk initrd.img \`$adt_ramdisk' does not exist"
+ echo "using calculated default ramdisk initrd.img: $adt_ramdisk" ;;
+ *) ;;
+ esac
+fi
case "$adt_modules" in
'') adt_modules="/lib/modules/`uname -r`" ;;