]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test(FULL-SYSTEMD): skip encrypted root if qemu -smbios is not supported
authorBenjamin Drung <benjamin.drung@canonical.com>
Mon, 10 Feb 2025 20:33:34 +0000 (21:33 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 12 Feb 2025 10:10:24 +0000 (11:10 +0100)
The qemu option `-smbios` is not supported on most architectures.
Therefore `TEIT-41-FULL-SYSTEMD` will fail.

Fixes #1213

test/TEST-41-FULL-SYSTEMD/test.sh

index e43e92aced1f541bb10096d1d68e29b9c3514ece..23180d4fba779b9dfba7a3cb928d3319d90238e9 100755 (executable)
@@ -52,11 +52,16 @@ test_run() {
     # shellcheck source=$TESTDIR/luks.uuid
     . "$TESTDIR"/luks.uuid
 
-    # luks
-    client_run "encrypted root with rd.luks.uuid" "type=11,value=io.systemd.credential:key=test" \
-        "rw root=LABEL=dracut_crypt rd.luks.uuid=$ID_FS_UUID rd.luks.key=/run/credentials/@system/key" || return 1
-    client_run "encrypted root with rd.luks.name" "type=11,value=io.systemd.credential:key=test" \
-        "rw root=/dev/mapper/crypt rd.luks.name=$ID_FS_UUID=crypt rd.luks.key=/run/credentials/@system/key" || return 1
+    if "$testdir"/run-qemu --supports -smbios; then
+        # luks
+        client_run "encrypted root with rd.luks.uuid" "type=11,value=io.systemd.credential:key=test" \
+            "rw root=LABEL=dracut_crypt rd.luks.uuid=$ID_FS_UUID rd.luks.key=/run/credentials/@system/key" || return 1
+        client_run "encrypted root with rd.luks.name" "type=11,value=io.systemd.credential:key=test" \
+            "rw root=/dev/mapper/crypt rd.luks.name=$ID_FS_UUID=crypt rd.luks.key=/run/credentials/@system/key" || return 1
+    else
+        echo "CLIENT TEST: encrypted root with rd.luks.uuid [SKIPPED]"
+        echo "CLIENT TEST: encrypted root with rd.luks.name [SKIPPED]"
+    fi
     return 0
 }