]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/test/test-os-util.c
Merge pull request #13365 from keszybz/fix-commits-from-pr-13246
[thirdparty/systemd.git] / src / test / test-os-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2
3 #include <errno.h>
4
5 #include "log.h"
6 #include "os-util.h"
7 #include "tests.h"
8
9 static void test_path_is_os_tree(void) {
10 assert_se(path_is_os_tree("/") > 0);
11 assert_se(path_is_os_tree("/etc") == 0);
12 assert_se(path_is_os_tree("/idontexist") == -ENOENT);
13 }
14
15 int main(int argc, char *argv[]) {
16 test_setup_logging(LOG_DEBUG);
17
18 test_path_is_os_tree();
19
20 return 0;
21 }