]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make test-udev accept only check when argc == 2
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 12 Nov 2018 04:20:20 +0000 (13:20 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 12 Nov 2018 07:32:10 +0000 (16:32 +0900)
Follow-up for 110a13202eab6d92678abcde08372d4afac1cc45.

src/test/test-udev.c

index 9f3aba70ab3acbecfefe399ba8efd2e004a1536d..102da4adc69b5e7e0ad90d1e9365aba03ff1aa76 100644 (file)
@@ -69,8 +69,14 @@ int main(int argc, char *argv[]) {
         if (fake_filesystems() < 0)
                 return EXIT_FAILURE;
 
-        if (argc == 2)
+        if (argc == 2) {
+                if (!streq(argv[1], "check")) {
+                        log_error("Unknown argument: %s", argv[1]);
+                        return EXIT_FAILURE;
+                }
+
                 return EXIT_SUCCESS;
+        }
 
         log_debug("version %s", PACKAGE_VERSION);
         mac_selinux_init();