]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-kernel-install: add tests for --entry-token= 26848/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Mar 2023 19:26:09 +0000 (04:26 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 5 Jun 2023 05:23:54 +0000 (14:23 +0900)
src/kernel-install/test-kernel-install.sh

index be9136b23fe9c57f32c5ee8de5d0a4de625d74ec..edc67e46fb9b3c929b958c7bdcfec90bfd456499 100755 (executable)
@@ -221,3 +221,20 @@ test ! -e "$BOOT_ROOT/the-token/1.1.1"
 test ! -e "$BOOT_ROOT/the-token/1.1.1"
 test -d "$BOOT_ROOT/the-token"
 rmdir "$BOOT_ROOT/the-token"
+
+###########################################
+# tests for --entry-token=
+###########################################
+"$kernel_install" -v --make-entry-directory=yes --entry-token=machine-id add 1.1.1 "$D/sources/linux" "$D/sources/initrd"
+test -d "$BOOT_ROOT/$MACHINE_ID/1.1.1"
+"$kernel_install" -v --make-entry-directory=yes --entry-token=machine-id remove 1.1.1
+test ! -e "$BOOT_ROOT/$MACHINE_ID/1.1.1"
+test -d "$BOOT_ROOT/$MACHINE_ID"
+rmdir "$BOOT_ROOT/$MACHINE_ID"
+
+"$kernel_install" -v --make-entry-directory=yes --entry-token=literal:hoge add 1.1.1 "$D/sources/linux" "$D/sources/initrd"
+test -d "$BOOT_ROOT/hoge/1.1.1"
+"$kernel_install" -v --make-entry-directory=yes --entry-token=literal:hoge remove 1.1.1
+test ! -e "$BOOT_ROOT/hoge/1.1.1"
+test -d "$BOOT_ROOT/hoge"
+rmdir "$BOOT_ROOT/hoge"