]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add simple testcase for io.systemd.Repart.ListCandidateDevices 39072/head
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Sep 2025 10:19:42 +0000 (12:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 23 Sep 2025 07:25:11 +0000 (09:25 +0200)
test/units/TEST-58-REPART.sh

index 19f9ca31c9a1fabf944d89d792a8ed9f1f911f39..014c00b3b6f607959ce478f8a0cef5d4d8df649f 100755 (executable)
@@ -1679,6 +1679,17 @@ EOF
     grep -q 'UUID=[0-9a-f-]* /home btrfs discard,rw,nodev,suid,exec,subvol=@home,zstd:1,noatime,lazytime 0 1' "$root"/etc/fstab
 }
 
+testcase_varlink_list_devices() {
+    REPART="$(which systemd-repart)"
+    varlinkctl introspect "$REPART"
+    varlinkctl call "$REPART" --graceful=io.systemd.Repart.NoCandidateDevices --collect io.systemd.Repart.ListCandidateDevices '{}'
+    varlinkctl call "$REPART" --graceful=io.systemd.Repart.NoCandidateDevices --collect io.systemd.Repart.ListCandidateDevices '{"ignoreRoot":true}'
+    varlinkctl call "$REPART" --graceful=io.systemd.Repart.NoCandidateDevices --collect io.systemd.Repart.ListCandidateDevices '{"ignoreEmpty":true}'
+    varlinkctl call "$REPART" --graceful=io.systemd.Repart.NoCandidateDevices --collect io.systemd.Repart.ListCandidateDevices '{"ignoreEmpty":true,"ignoreRoot":true}'
+
+    varlinkctl call /run/systemd/io.systemd.Repart --graceful=io.systemd.Repart.NoCandidateDevices --collect io.systemd.Repart.ListCandidateDevices '{"ignoreEmpty":true,"ignoreRoot":true}'
+}
+
 OFFLINE="yes"
 run_testcases