X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-ovsdb.c;h=aca68dcd359e53667242659ba841b4f104d83985;hb=71d7c22f54ae32d15133571e09ddf7ab435e8afa;hp=cdc939bb4dfa777f24eeb8b78cb6a96516c2deaa;hpb=4e8e4213a815a30216e855a805a8bcd5b8c5a886;p=openvswitch diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index cdc939bb..aca68dcd 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -1779,9 +1779,36 @@ idl_set(struct ovsdb_idl *idl, char *commands, int step) "i=%d", atoi(arg1)); } idltest_simple_delete(s); + } else if (!strcmp(name, "verify")) { + const struct idltest_simple *s; + + if (!arg2 || arg3) { + ovs_fatal(0, "\"verify\" command requires 2 arguments"); + } + + s = idltest_find_simple(idl, atoi(arg1)); + if (!s) { + ovs_fatal(0, "\"verify\" command asks for nonexistent " + "i=%d", atoi(arg1)); + } + + if (!strcmp(arg2, "i")) { + idltest_simple_verify_i(s); + } else if (!strcmp(arg2, "b")) { + idltest_simple_verify_b(s); + } else if (!strcmp(arg2, "s")) { + idltest_simple_verify_s(s); + } else if (!strcmp(arg2, "u")) { + idltest_simple_verify_s(s); + } else if (!strcmp(arg2, "r")) { + idltest_simple_verify_r(s); + } else { + ovs_fatal(0, "\"verify\" command asks for unknown column %s", + arg2); + } } else if (!strcmp(name, "increment")) { if (!arg2 || arg3) { - ovs_fatal(0, "\"set\" command requires 2 arguments"); + ovs_fatal(0, "\"increment\" command requires 2 arguments"); } ovsdb_idl_txn_increment(txn, arg1, arg2, NULL); increment = true; @@ -1815,7 +1842,7 @@ do_idl(int argc, char *argv[]) idltest_init(); - idl = ovsdb_idl_create(argv[1], &idltest_idl_class); + idl = ovsdb_idl_create(argv[1], &idltest_idl_class, true); if (argc > 2) { struct stream *stream;