summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@prydeworx.com>2018-11-08 07:53:08 +0100
committerSven Eden <sven.eden@prydeworx.com>2018-11-08 08:02:57 +0100
commit42d3d5dbff8f6d0ef55ac89fe176a522208f5acb (patch)
tree88ffd281165efa489c3d26424cc6aacb65c116cc
parent68a05fa61dabdecc9fce9eb406c5386c57bdd82c (diff)
Prep v239.2: Fix migration errors in test
-rw-r--r--src/test/meson.build17
-rw-r--r--src/test/test-proc-cmdline.c4
-rw-r--r--src/test/test-set-disable-mempool.c6
-rw-r--r--src/test/test-string-util.c8
4 files changed, 23 insertions, 12 deletions
diff --git a/src/test/meson.build b/src/test/meson.build
index ed94775..d08e612 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 47fef79..d77c7f6 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 e7dbf61..b259c95 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 <pthread.h>
+#include <pthread.h>
-//#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 5c68ba6..2d10041 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;
}