blob: 9a252f62f1b579f5a967d936a95a67fe94520b02 (
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
33
34
35
36
37
|
#!/bin/sh -e
SUPPORTED_FLAVOURS='amd64 arm64 armmp powerpc64 s390x generic'
ROOTDISK_QEMU_IF=virtio
ROOTDISK_LINUX_NAME=vda
USRDISK="$(mktemp)"
USRDISK_QEMU_IF=virtio
USRDISK_LINUX_NAME=vdb
. 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
# Set up /usr filesystem and fstab entry for it
mkdir -p "${ROOTDIR}/etc"
echo > "${ROOTDIR}/etc/fstab" "/dev/${USRDISK_LINUX_NAME} /usr ext2 defaults 0 2"
USRDIR="$(mktemp -d)"
mv "${ROOTDIR}/usr/"* "${USRDIR}"
build_rootfs_ext2
build_fs_ext2 "${USRDIR}" "${USRDISK}"
run_qemu
check_no_network_configuration
# Check that fsck ran on both devices
grep -q "^/dev/${ROOTDISK_LINUX_NAME}: clean," "${OUTPUT}"
grep -q "^/dev/${USRDISK_LINUX_NAME}: clean," "${OUTPUT}"
|