]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add regression tests for find_esp() and friend 27299/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 18 Apr 2023 19:04:40 +0000 (04:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 18 Apr 2023 19:04:57 +0000 (04:04 +0900)
test/test-bootctl-json.sh

index fde5fbd1de175d6017cf91e33b8448ad340bd7d8..4d7c468241b78e7168c60a3367a6dec97aab7622 100755 (executable)
@@ -28,6 +28,15 @@ command -v jq >/dev/null || {
 "$bootctl" -R || test "$?" -eq 80
 "$bootctl" -RR || test "$?" -eq 80
 
+# regression tests for
+# https://github.com/systemd/systemd/pull/27199#issuecomment-1511387731
+if ret=$("$bootctl" --print-esp-path); then
+    test "$ret" = "/efi" -o "$ret" = "/boot" -o "$ret" = "/boot/efi"
+fi
+if ret=$("bootctl" --print-boot-path); then
+    test "$ret" = "/efi" -o "$ret" = "/boot" -o "$ret" = "/boot/efi"
+fi
+
 if "$bootctl" -R > /dev/null ; then
     P=$("$bootctl" -R)
     PP=$("$bootctl" -RR)