]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
src/ukify/test/test_ukify: fix skipped tests 27539/head
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Mon, 8 May 2023 12:41:04 +0000 (08:41 -0400)
committerEmanuele Giuseppe Esposito <eesposit@redhat.com>
Wed, 10 May 2023 13:20:46 +0000 (09:20 -0400)
Some tests are skipped because initrd extracted from bootctl
is "/boot/initramfs-5.14.0-284.el9.x86_64.img $tuned_initrd"
and not just "/boot/initramfs-5.14.0-284.el9.x86_64.img".
Therefore split and remove the additional garbage.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
src/ukify/test/test_ukify.py

index 7af4c7d0c2b5309d71c62c057b000e994a7a87a1..983a67aad6f273dc14057d7d5d69e362913eb316 100755 (executable)
@@ -321,7 +321,7 @@ def kernel_initrd():
     for item in items:
         try:
             linux = f"{item['root']}{item['linux']}"
-            initrd = f"{item['root']}{item['initrd'][0]}"
+            initrd = f"{item['root']}{item['initrd'][0].split(' ')[0]}"
         except (KeyError, IndexError):
             continue
         return [linux, initrd]