]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-ukify: Skip kernel images we can't access
authorDaan De Meyer <daan@amutable.com>
Wed, 20 May 2026 08:51:56 +0000 (08:51 +0000)
committerDaan De Meyer <daan@amutable.com>
Wed, 20 May 2026 16:04:26 +0000 (16:04 +0000)
src/ukify/test/test_ukify.py

index 0fe27601f15b476d88711babae921818fe3df7c0..11f843ddb601574f4c976c98f8fd4f20b7160dd6 100755 (executable)
@@ -456,6 +456,9 @@ def kernel_initrd():
     items = sorted(glob.glob('/lib/modules/*/vmlinuz'))
     if not items:
         items = sorted(glob.glob('/boot/vmlinuz*'))
+    # Drop entries we cannot read (e.g. /boot/vmlinuz.old with mode 0600 on
+    # GitHub-hosted runners), the test opens the file later and would fail.
+    items = [p for p in items if os.access(p, os.R_OK)]
     if not items:
         return None