Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions combustion
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
14 changes: 14 additions & 0 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down