blob: ad42f8f3b001f680402f84a2132b44dabff8905e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/sh -e
SUPPORTED_FLAVOURS='amd64 generic'
ROOTDISK_QEMU_IF=virtio
ROOTDISK_LINUX_NAME=nonexistent
. debian/tests/test-common
cat >>"${CONFDIR}/initramfs.conf" <<EOF
MODULES=list
BUSYBOX=n
FSTYPE=ext2
EOF
cat >"${CONFDIR}/modules" <<EOF
ext2
virtio_pci
virtio_blk
EOF
build_initramfs
build_rootfs_ext2
run_qemu_nocheck_amd64
grep -qF "ALERT! /dev/nonexistent does not exist. Dropping to a shell!" "${OUTPUT}"
grep -qF "(initramfs) " "${OUTPUT}"
run_qemu_nocheck_amd64 "panic=-1"
grep -qF "Rebooting automatically due to panic= boot argument" "${OUTPUT}"
! grep -qF "(initramfs) " "${OUTPUT}"
run_qemu_nocheck_amd64 "panic=0"
grep -qF "Halting automatically due to panic= boot argument" "${OUTPUT}"
! grep -qF "(initramfs) " "${OUTPUT}"
|