summaryrefslogtreecommitdiff
path: root/tests/test-ovn.c
diff options
context:
space:
mode:
authorRyan Moats <rmoats@us.ibm.com>2016-08-15 18:47:29 +0000
committerBen Pfaff <blp@ovn.org>2016-08-15 17:26:15 -0700
commit1f4a7252d9e7ee102b76325daca2b7007e5da7f7 (patch)
treeedcbbe2a8bc31820cdc030a852598ef935ee0199 /tests/test-ovn.c
parent239fa5bbe6e54abcec9b58b137a566d06edaba49 (diff)
downloadopenvswitch-1f4a7252d9e7ee102b76325daca2b7007e5da7f7.tar.gz
Add read-only option to ovs-dpctl and ovs-ofctl commands.
ovs-dpctl and ovs-ofctl lack a read-only option to prevent running of commands that perform read-write operations. Add it and the necessary scaffolding to each. Signed-off-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests/test-ovn.c')
-rw-r--r--tests/test-ovn.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/test-ovn.c b/tests/test-ovn.c
index 35db14443..7d77e224a 100644
--- a/tests/test-ovn.c
+++ b/tests/test-ovn.c
@@ -1513,26 +1513,26 @@ test_ovn_main(int argc, char *argv[])
static const struct ovs_cmdl_command commands[] = {
/* Lexer. */
- {"lex", NULL, 0, 0, test_lex},
+ {"lex", NULL, 0, 0, test_lex, OVS_RO},
/* Symbol table. */
- {"dump-symtab", NULL, 0, 0, test_dump_symtab},
+ {"dump-symtab", NULL, 0, 0, test_dump_symtab, OVS_RO},
/* Expressions. */
- {"parse-expr", NULL, 0, 0, test_parse_expr},
- {"annotate-expr", NULL, 0, 0, test_annotate_expr},
- {"simplify-expr", NULL, 0, 0, test_simplify_expr},
- {"normalize-expr", NULL, 0, 0, test_normalize_expr},
- {"expr-to-flows", NULL, 0, 0, test_expr_to_flows},
- {"evaluate-expr", NULL, 1, 1, test_evaluate_expr},
- {"composition", NULL, 1, 1, test_composition},
- {"tree-shape", NULL, 1, 1, test_tree_shape},
- {"exhaustive", NULL, 1, 1, test_exhaustive},
+ {"parse-expr", NULL, 0, 0, test_parse_expr, OVS_RO},
+ {"annotate-expr", NULL, 0, 0, test_annotate_expr, OVS_RO},
+ {"simplify-expr", NULL, 0, 0, test_simplify_expr, OVS_RO},
+ {"normalize-expr", NULL, 0, 0, test_normalize_expr, OVS_RO},
+ {"expr-to-flows", NULL, 0, 0, test_expr_to_flows, OVS_RO},
+ {"evaluate-expr", NULL, 1, 1, test_evaluate_expr, OVS_RO},
+ {"composition", NULL, 1, 1, test_composition, OVS_RO},
+ {"tree-shape", NULL, 1, 1, test_tree_shape, OVS_RO},
+ {"exhaustive", NULL, 1, 1, test_exhaustive, OVS_RO},
/* Actions. */
- {"parse-actions", NULL, 0, 0, test_parse_actions},
+ {"parse-actions", NULL, 0, 0, test_parse_actions, OVS_RO},
- {NULL, NULL, 0, 0, NULL},
+ {NULL, NULL, 0, 0, NULL, OVS_RO},
};
struct ovs_cmdl_context ctx;
ctx.argc = argc - optind;