]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add a new unit test, src/test/test-binfmt-util.c
authorZIHCO <chizobajames21@gmail.com>
Thu, 3 Apr 2025 01:50:12 +0000 (02:50 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 3 Apr 2025 09:32:23 +0000 (18:32 +0900)
src/test/meson.build
src/test/test-binfmt-util.c [new file with mode: 0644]

index 4ef296a41aab72fd9917d4d5b312216f3b51820d..4c211cdc6292814519e1289f1ecd36f01b09d391 100644 (file)
@@ -49,6 +49,7 @@ simple_tests += files(
         'test-argv-util.c',
         'test-audit-util.c',
         'test-barrier.c',
+        'test-binfmt-util.c',
         'test-bitfield.c',
         'test-bitmap.c',
         'test-blockdev-util.c',
diff --git a/src/test/test-binfmt-util.c b/src/test/test-binfmt-util.c
new file mode 100644 (file)
index 0000000..7027efc
--- /dev/null
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "binfmt-util.h"
+#include "tests.h"
+
+TEST(binfmt_mounted) {
+        ASSERT_OK(binfmt_mounted());
+}
+
+DEFINE_TEST_MAIN(LOG_DEBUG);