summaryrefslogtreecommitdiffstats
path: root/src/test/test-taint.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/test-taint.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/test-taint.c b/src/test/test-taint.c
new file mode 100644
index 0000000..d9aa79d
--- /dev/null
+++ b/src/test/test-taint.c
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "taint.h"
+#include "tests.h"
+
+TEST(taint_string) {
+ _cleanup_free_ char *a = taint_string();
+ assert_se(a);
+ log_debug("taint string: '%s'", a);
+
+ assert_se(!!strstr(a, "cgroupsv1") == (cg_all_unified() == 0));
+}
+
+DEFINE_TEST_MAIN(LOG_DEBUG);