tests: Allow unit tests to run as root.
[sliver-openvswitch.git] / vswitchd / ovs-vswitchd.c
index 359e3ab..bdc3533 100644 (file)
@@ -31,6 +31,7 @@
 #include "compiler.h"
 #include "daemon.h"
 #include "dirs.h"
+#include "dpif.h"
 #include "dummy.h"
 #include "leak-checker.h"
 #include "netdev.h"
@@ -121,6 +122,7 @@ parse_options(int argc, char *argv[])
         LEAK_CHECKER_OPTION_ENUMS,
         OPT_BOOTSTRAP_CA_CERT,
         OPT_ENABLE_DUMMY,
+        OPT_DISABLE_SYSTEM,
         DAEMON_OPTION_ENUMS
     };
     static struct option long_options[] = {
@@ -134,6 +136,7 @@ parse_options(int argc, char *argv[])
         {"peer-ca-cert", required_argument, NULL, OPT_PEER_CA_CERT},
         {"bootstrap-ca-cert", required_argument, NULL, OPT_BOOTSTRAP_CA_CERT},
         {"enable-dummy", no_argument, NULL, OPT_ENABLE_DUMMY},
+        {"disable-system", no_argument, NULL, OPT_DISABLE_SYSTEM},
         {NULL, 0, NULL, 0},
     };
     char *short_options = long_options_to_short_options(long_options);
@@ -181,6 +184,10 @@ parse_options(int argc, char *argv[])
             dummy_enable();
             break;
 
+        case OPT_DISABLE_SYSTEM:
+            dp_blacklist_provider("system");
+            break;
+
         case '?':
             exit(EXIT_FAILURE);