Test 72 NBD has the helper functions `make_client_rootfs` and
`make_server_rootfs` which makes the test easier to read.
Introduce `make_test_rootfs` for the simpler tests (where there are no
client/server).
client_run "readonly root snapshot" "rd.fstab=0 subvol=snapshot-root"
}
-test_setup() {
+make_test_rootfs() {
# Create what will eventually be our root filesystem onto an overlay
build_client_rootfs "$TESTDIR/overlay/source"
echo "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_root /usr btrfs subvol=usr,rw 0 2" \
echo "Could not create root filesystem"
return 1
fi
+}
+test_setup() {
+ make_test_rootfs
test_dracut \
--add-drivers "btrfs"
}
return 0
}
-test_setup() {
+make_test_rootfs() {
# Create what will eventually be our root filesystem onto an overlay
build_client_rootfs "$TESTDIR/overlay/source"
-initrd "$TESTDIR"/initramfs.makeroot
test_marker_check dracut-root-block-created
rm -rf "$TESTDIR"/overlay
+}
+
+test_setup() {
+ make_test_rootfs
+
cryptoUUIDS=$(grep -F -a -m 3 ID_FS_UUID "$TESTDIR"/marker.img)
for uuid in $cryptoUUIDS; do
eval "$uuid"