From: Zbigniew Jędrzejewski-Szmek Date: Wed, 1 Apr 2026 13:47:30 +0000 (+0200) Subject: test-efi-string: add more cases X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1342e063b1a6d8b4d2dc39705e330da837cecff;p=thirdparty%2Fsystemd.git test-efi-string: add more cases This excercises the patterns used in 45e4df9a331208d20ecb9f5ead8110eb50a5b86d. --- diff --git a/src/boot/test-efi-string.c b/src/boot/test-efi-string.c index 76a891ec1fa..7633534dd4c 100644 --- a/src/boot/test-efi-string.c +++ b/src/boot/test-efi-string.c @@ -475,6 +475,12 @@ TEST(efi_fnmatch) { TEST_FNMATCH_ONE_MAY_SKIP_LIBC("[a\\-z]", "b", false); TEST_FNMATCH_ONE("?a*b[.-0]c", "/a/b/c", true); TEST_FNMATCH_ONE("debian-*-*-*.*", "debian-jessie-2018-06-17-kernel-image-5.10.0-16-amd64.efi", true); + TEST_FNMATCH_ONE("console=*", "console=xxx", true); + TEST_FNMATCH_ONE("* console=*", "opt1 console=ttyS0 opt2", true); + TEST_FNMATCH_ONE("console=*", " console=xxx", false); + TEST_FNMATCH_ONE("* console=", "opt1 console=ttyS0 opt2", false); + TEST_FNMATCH_ONE("console=*", "netconsole=@/eth0,@10.0.0.1/", false); + TEST_FNMATCH_ONE("* console=*", "netconsole=@/eth0,@10.0.0.1/", false); /* These would take forever with a backtracking implementation. */ TEST_FNMATCH_ONE(