]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make homed test run in qemu 21380/head
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Nov 2021 15:21:37 +0000 (16:21 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Nov 2021 11:33:44 +0000 (12:33 +0100)
test/TEST-46-HOMED/test.sh
test/units/testsuite-46.sh

index 7725995195734e9c05778bbe4433c73a67be3f72..216f3d2fb2ecfbe2095a2cd38324faa84a0b7058 100755 (executable)
@@ -3,9 +3,23 @@
 set -e
 
 TEST_DESCRIPTION="testing homed"
-TEST_NO_QEMU=1
+
+# Skip the qemu version of the test, unless we have btrfs
+(modprobe -nv btrfs && command -v mkfs.btrfs) || TEST_NO_QEMU=1
 
 # shellcheck source=test/test-functions
 . "${TEST_BASE_DIR:?}/test-functions"
 
+# Need loop devices for mounting images
+test_append_files() {
+    (
+        if [ "$TEST_NO_QEMU" != "1" ] ; then
+            instmods loop =block
+            install_dmevent
+            install_btrfs
+            generate_module_dependencies
+        fi
+    )
+}
+
 do_test "$@"
index 72d1fd6f8506c870d284265e30dc99a466da1014..fc4fc502979652a31c98af02a2c864635f3b3681 100755 (executable)
@@ -26,7 +26,9 @@ inspect() {
 systemd-analyze log-level debug
 systemd-analyze log-target console
 
-NEWPASSWORD=xEhErW0ndafV4s homectl create test-user --disk-size=20M
+# we enable --luks-discard= since we run our tests in a tight VM, hence don't
+# needlessly pressure for storage
+NEWPASSWORD=xEhErW0ndafV4s homectl create test-user --disk-size=256M --luks-discard=yes
 inspect test-user
 
 PASSWORD=xEhErW0ndafV4s homectl authenticate test-user