diff --git a/combustion b/combustion index 376a6d1..273658e 100644 --- a/combustion +++ b/combustion @@ -260,6 +260,12 @@ chroot /sysroot mount -a || true findmnt /sysroot/run >/dev/null || mount -t tmpfs tmpfs /sysroot/run findmnt /sysroot/tmp >/dev/null || mount -t tmpfs tmpfs /sysroot/tmp +# The /etc bind mount in the nested subvolume setup is read-only at first, +# make it read-write. +if ! [ -w /sysroot/etc ]; then + mount -o remount,rw /sysroot/etc +fi + # Fake a netconfig setup if [ -r /etc/resolv.conf ]; then mkdir -p /sysroot/run/netconfig/ diff --git a/test/test.sh b/test/test.sh index 965603c..049fa66 100755 --- a/test/test.sh +++ b/test/test.sh @@ -70,6 +70,7 @@ rpm -e --nodeps --noscripts combustion cp -av /mnt/install/usr / cp /usr/lib/modules/$(uname -r)/vmlinuz /mnt/vmlinuz dracut -f --no-hostonly /mnt/initrd +dracut -f --no-hostonly --omit "ignition" /mnt/initrd-noignition touch /mnt/done umount /mnt SYSTEMD_IGNORE_CHROOT=1 poweroff -f @@ -141,6 +142,19 @@ if ! [ -e "${tmpdir}/done" ]; then exit 1 fi +# Test combustion.url using QEMU's builtin tftp server without ignition +rm -f "${tmpdir}/done" +qemu-img snapshot -a initial openSUSE-MicroOS.x86_64-kvm-and-xen.qcow2 + +timeout 300 qemu-system-x86_64 "${QEMU_BASEARGS[@]}" -drive if=virtio,file=openSUSE-MicroOS.x86_64-kvm-and-xen.qcow2 \ + -kernel vmlinuz -initrd initrd-noignition -append "root=LABEL=ROOT console=ttyS0 quiet systemd.show_status=1 systemd.log_target=console systemd.journald.forward_to_console=1 rd.emergency=poweroff rd.shell=0 combustion.url=tftp://10.0.2.2/testscript" \ + -nic "user,tftp=$tmpdir" + +if ! [ -e "${tmpdir}/done" ]; then + echo "Test failed" + exit 1 +fi + # Now do some testing with Minimal-VM instead of MicroOS # Download latest Minimal-VM image