From: Mike Gilbert Date: Mon, 25 Nov 2019 01:24:44 +0000 (-0500) Subject: test-proc-cmdline: disable EFI-dependent tests when EFI is disabled X-Git-Tag: v244~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e05b7c0955ff1dd6fec1a81fc9064677bf813028;p=thirdparty%2Fsystemd.git test-proc-cmdline: disable EFI-dependent tests when EFI is disabled Fixes: https://github.com/systemd/systemd/issues/14116 --- diff --git a/src/test/test-proc-cmdline.c b/src/test/test-proc-cmdline.c index 3231e4a3e69..bdcd1fc4c7c 100644 --- a/src/test/test-proc-cmdline.c +++ b/src/test/test-proc-cmdline.c @@ -173,6 +173,7 @@ static void test_proc_cmdline_get_bool(void) { assert_se(putenv((char*) "SYSTEMD_PROC_CMDLINE=") == 0); assert_se(putenv((char*) "SYSTEMD_EFI_OPTIONS=foo_bar bar-waldo=1 x_y-z=0 quux=miep\nda=yes\nthe=1") == 0); +#if ENABLE_EFI assert_se(proc_cmdline_get_bool("", &value) == -EINVAL); assert_se(proc_cmdline_get_bool("abc", &value) == 0 && value == false); assert_se(proc_cmdline_get_bool("foo_bar", &value) > 0 && value == true); @@ -186,6 +187,7 @@ static void test_proc_cmdline_get_bool(void) { assert_se(proc_cmdline_get_bool("quux", &value) == -EINVAL && value == false); assert_se(proc_cmdline_get_bool("da", &value) > 0 && value == true); assert_se(proc_cmdline_get_bool("the", &value) > 0 && value == true); +#endif } static void test_proc_cmdline_get_key_many(void) {