From 42d3d5dbff8f6d0ef55ac89fe176a522208f5acb Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Thu, 8 Nov 2018 07:53:08 +0100 Subject: Prep v239.2: Fix migration errors in test --- src/test/meson.build | 17 ++++++++++------- src/test/test-proc-cmdline.c | 4 +++- src/test/test-set-disable-mempool.c | 6 +++--- src/test/test-string-util.c | 8 +++++++- 4 files changed, 23 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/test/meson.build b/src/test/meson.build index ed947751e..d08e61223 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -953,14 +953,15 @@ tests += [ [], []], - [['src/libelogind/sd-device/test-udev-device-thread.c'], - [libbasic, - libshared_static, - libudev], - [threads]], -] - #if 0 /// UNNEEDED in elogind +# [['src/libelogind/sd-device/test-udev-device-thread.c'], +# [libbasic, +# libshared_static, +# libudev], +# [threads]], +# ] +# +# # if cxx.found() # tests += [ # [['src/libelogind/sd-bus/test-bus-vtable-cc.cc'], @@ -968,6 +969,8 @@ tests += [ # []] # ] # endif +#else +] #endif // 0 ############################################################ diff --git a/src/test/test-proc-cmdline.c b/src/test/test-proc-cmdline.c index 47fef7930..d77c7f641 100644 --- a/src/test/test-proc-cmdline.c +++ b/src/test/test-proc-cmdline.c @@ -170,7 +170,6 @@ static void test_proc_cmdline_key_startswith(void) { assert_se(proc_cmdline_key_startswith("foo-bar", "foo_")); assert_se(!proc_cmdline_key_startswith("foo-bar", "foo_xx")); } -#endif // 0 static void test_runlevel_to_target(void) { log_info("/* %s */", __func__); @@ -189,16 +188,19 @@ static void test_runlevel_to_target(void) { assert_se(streq_ptr(runlevel_to_target("3"), NULL)); assert_se(streq_ptr(runlevel_to_target("rd.rescue"), SPECIAL_RESCUE_TARGET)); } +#endif // 0 int main(void) { log_parse_environment(); log_open(); test_proc_cmdline_parse(); +#if 0 /// UNNEEDED by elogind test_proc_cmdline_override(); test_proc_cmdline_given(false); /* Repeat the same thing, but now flip our ininitrdness */ test_proc_cmdline_given(true); +#endif // 0 test_proc_cmdline_key_streq(); #if 0 /// UNNEEDED by elogind test_proc_cmdline_key_startswith(); diff --git a/src/test/test-set-disable-mempool.c b/src/test/test-set-disable-mempool.c index e7dbf61c2..b259c9532 100644 --- a/src/test/test-set-disable-mempool.c +++ b/src/test/test-set-disable-mempool.c @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -//#include +#include -//#include "process-util.h" -//#include "set.h" +#include "process-util.h" +#include "set.h" //#include "tests.h" #define NUM 100 diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c index 5c68ba6b6..2d10041b2 100644 --- a/src/test/test-string-util.c +++ b/src/test/test-string-util.c @@ -556,9 +556,12 @@ static void test_memory_startswith(void) { assert_se(streq(memory_startswith("xxx", 4, "x"), "xx")); assert_se(streq(memory_startswith("xxx", 4, "xx"), "x")); assert_se(streq(memory_startswith("xxx", 4, "xxx"), "")); +#if 0 /// This is not used anywhere in elogind and thus masked. assert_se(!memory_startswith("xxx", 4, "xxxx")); +#endif // 0 } +#if 0 /// This is not used anywhere in elogind and thus masked. static void test_memory_startswith_no_case(void) { assert_se(streq(memory_startswith_no_case("", 0, ""), "")); assert_se(streq(memory_startswith_no_case("", 1, ""), "")); @@ -581,6 +584,7 @@ static void test_memory_startswith_no_case(void) { assert_se(memory_startswith_no_case((char[2]){'X', 'x'}, 2, "Xx")); assert_se(memory_startswith_no_case((char[2]){'X', 'X'}, 2, "XX")); } +#endif // 0 int main(int argc, char *argv[]) { test_string_erase(); @@ -616,7 +620,9 @@ int main(int argc, char *argv[]) { test_first_word(); test_strlen_ptr(); test_memory_startswith(); +#if 0 /// This is not used anywhere in elogind and thus masked. test_memory_startswith_no_case(); - +#endif // 0 + return 0; } -- cgit v1.2.3