]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-selinux.c
Merge pull request #15442 from poettering/fido2
[thirdparty/systemd.git] / src / test / test-selinux.c
index b676c259134c36926e1b265e8e108f4a5345ad99..59b4f719466ec4b02cd5b0bbc43699387f38a65c 100644 (file)
@@ -1,21 +1,4 @@
-/***
-  This file is part of systemd.
-
-  Copyright 2016 Zbigniew Jędrzejewski-Szmek
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
+/* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <sys/stat.h>
 
@@ -24,6 +7,7 @@
 #include "log.h"
 #include "selinux-util.h"
 #include "string-util.h"
+#include "tests.h"
 #include "time-util.h"
 #include "util.h"
 
@@ -35,16 +19,16 @@ static void test_testing(void) {
         b = mac_selinux_use();
         log_info("mac_selinux_use → %s", yes_no(b));
 
-        b = mac_selinux_have();
-        log_info("mac_selinux_have → %s", yes_no(b));
+        b = mac_selinux_use();
+        log_info("mac_selinux_use → %s", yes_no(b));
 
         mac_selinux_retest();
 
         b = mac_selinux_use();
         log_info("mac_selinux_use → %s", yes_no(b));
 
-        b = mac_selinux_have();
-        log_info("mac_selinux_have → %s", yes_no(b));
+        b = mac_selinux_use();
+        log_info("mac_selinux_use → %s", yes_no(b));
 }
 
 static void test_loading(void) {
@@ -109,8 +93,7 @@ int main(int argc, char **argv) {
         if (argc >= 2)
                 path = argv[1];
 
-        log_set_max_level(LOG_DEBUG);
-        log_parse_environment();
+        test_setup_logging(LOG_DEBUG);
 
         test_testing();
         test_loading();