X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fovsdb-idl.at;h=9b90b032c5f837ca65e835c091df17f0b1de0a69;hb=2da0385d1f57fe00977d2e58022b3f9a6604192e;hp=552f627f8ed7b698c9a69053cef3832712f6cce9;hpb=0d0f05b909b6428d44eb147bd4edd73782d2a137;p=openvswitch diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at index 552f627f..9b90b032 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at @@ -38,7 +38,8 @@ OVSDB_CHECK_IDL([simple idl, initially empty, no ops], OVSDB_CHECK_IDL([simple idl, initially empty, various ops], [], - [['[{"op": "insert", + [['["idltest", + {"op": "insert", "table": "simple", "row": {"i": 1, "r": 2.0, @@ -54,15 +55,18 @@ OVSDB_CHECK_IDL([simple idl, initially empty, various ops], {"op": "insert", "table": "simple", "row": {}}]' \ - '[{"op": "update", + '["idltest", + {"op": "update", "table": "simple", "where": [], "row": {"b": true}}]' \ - '[{"op": "update", + '["idltest", + {"op": "update", "table": "simple", "where": [], "row": {"r": 123.5}}]' \ - '[{"op": "insert", + '["idltest", + {"op": "insert", "table": "simple", "row": {"i": -1, "r": 125, @@ -73,11 +77,13 @@ OVSDB_CHECK_IDL([simple idl, initially empty, various ops], "ba": ["set", [false]], "sa": ["set", []], "ua": ["set", []]}}]' \ - '[{"op": "update", + '["idltest", + {"op": "update", "table": "simple", "where": [["i", "<", 1]], "row": {"s": "newstring"}}]' \ - '[{"op": "delete", + '["idltest", + {"op": "delete", "table": "simple", "where": [["i", "==", 0]]}]' \ 'reconnect']], @@ -109,7 +115,8 @@ OVSDB_CHECK_IDL([simple idl, initially empty, various ops], ]]) OVSDB_CHECK_IDL([simple idl, initially populated], - [['[{"op": "insert", + [['["idltest", + {"op": "insert", "table": "simple", "row": {"i": 1, "r": 2.0, @@ -125,7 +132,8 @@ OVSDB_CHECK_IDL([simple idl, initially populated], {"op": "insert", "table": "simple", "row": {}}]']], - [['[{"op": "update", + [['["idltest", + {"op": "update", "table": "simple", "where": [], "row": {"b": true}}]']], @@ -138,7 +146,8 @@ OVSDB_CHECK_IDL([simple idl, initially populated], ]]) OVSDB_CHECK_IDL([simple idl, writing via IDL], - [['[{"op": "insert", + [['["idltest", + {"op": "insert", "table": "simple", "row": {"i": 1, "r": 2.0, @@ -168,7 +177,8 @@ OVSDB_CHECK_IDL([simple idl, writing via IDL], ]]) OVSDB_CHECK_IDL([simple idl, increment operation], - [['[{"op": "insert", + [['["idltest", + {"op": "insert", "table": "simple", "row": {}}]']], [['set 0 r 2.0, increment simple i']], @@ -180,14 +190,12 @@ OVSDB_CHECK_IDL([simple idl, increment operation], OVSDB_CHECK_IDL([self-linking idl, consistent ops], [], - [['[{"op": "insert", + [['["idltest", + {"op": "insert", "table": "link1", "row": {"i": 0, "k": ["named-uuid", "self"]}, "uuid-name": "self"}]' \ - '[{"op": "declare", - "uuid-name": "row1"}, - {"op": "declare", - "uuid-name": "row2"}, + '["idltest", {"op": "insert", "table": "link1", "row": {"i": 1, "k": ["named-uuid", "row2"]}, @@ -196,18 +204,20 @@ OVSDB_CHECK_IDL([self-linking idl, consistent ops], "table": "link1", "row": {"i": 2, "k": ["named-uuid", "row1"]}, "uuid-name": "row2"}]' \ - '[{"op": "update", + '["idltest", + {"op": "update", "table": "link1", "where": [["i", "==", 1]], "row": {"k": ["uuid", "#1#"]}}]' \ - '[{"op": "update", + '["idltest", + {"op": "update", "table": "link1", "where": [], "row": {"k": ["uuid", "#0#"]}}]']], [[000: empty 001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]} 002: i=0 k=0 ka=[] l2= uuid=<0> -003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]},{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]} +003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]} 004: i=0 k=0 ka=[] l2= uuid=<0> 004: i=1 k=2 ka=[] l2= uuid=<1> 004: i=2 k=1 ka=[] l2= uuid=<2> @@ -224,27 +234,33 @@ OVSDB_CHECK_IDL([self-linking idl, consistent ops], OVSDB_CHECK_IDL([self-linking idl, inconsistent ops], [], - [['[{"op": "insert", + [['["idltest", + {"op": "insert", "table": "link1", "row": {"i": 0, "k": ["uuid", "cf197cc5-c8c9-42f5-82d5-c71a9f2cb96b"]}}]' \ - '+[{"op": "insert", + '+["idltest", + {"op": "insert", "table": "link1", "uuid-name": "one", "row": {"i": 1, "k": ["named-uuid", "one"]}}, {"op": "insert", "table": "link1", "row": {"i": 2, "k": ["named-uuid", "one"]}}]' \ - '[{"op": "update", + '["idltest", + {"op": "update", "table": "link1", "where": [], "row": {"k": ["uuid", "c2fca39a-e69a-42a4-9c56-5eca85839ce9"]}}]' \ - '+[{"op": "delete", + '+["idltest", + {"op": "delete", "table": "link1", "where": [["_uuid", "==", ["uuid", "#1#"]]]}]' \ - '+[{"op": "delete", + '+["idltest", + {"op": "delete", "table": "link1", "where": [["_uuid", "==", ["uuid", "#2#"]]]}]' \ - '[{"op": "delete", + '["idltest", + {"op": "delete", "table": "link1", "where": []}]' \ ]], @@ -264,7 +280,8 @@ OVSDB_CHECK_IDL([self-linking idl, inconsistent ops], OVSDB_CHECK_IDL([self-linking idl, sets], [], - [['[{"op": "insert", + [['["idltest", + {"op": "insert", "table": "link1", "row": {"i": 0, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i0"]]]}, "uuid-name": "i0"}, @@ -280,15 +297,18 @@ OVSDB_CHECK_IDL([self-linking idl, sets], "table": "link1", "row": {"i": 3, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i3"]]]}, "uuid-name": "i3"}]' \ - '[{"op": "update", + '["idltest", + {"op": "update", "table": "link1", "where": [], "row": {"ka": ["set", [["uuid", "#0#"], ["uuid", "#1#"], ["uuid", "#2#"], ["uuid", "#3#"]]]}}]' \ - '[{"op": "update", + '["idltest", + {"op": "update", "table": "link1", "where": [], "row": {"ka": ["set", [["uuid", "#0#"], ["uuid", "88702e78-845b-4a6e-ad08-cf68922ae84a"], ["uuid", "#2#"], ["uuid", "1ac2b12e-b767-4805-a55d-43976e40c465"]]]}}]' \ - '+[{"op": "delete", + '+["idltest", + {"op": "delete", "table": "link1", "where": []}]']], [[000: empty @@ -310,7 +330,8 @@ OVSDB_CHECK_IDL([self-linking idl, sets], OVSDB_CHECK_IDL([external-linking idl, consistent ops], [], - [['[{"op": "insert", + [['["idltest", + {"op": "insert", "table": "link2", "row": {"i": 0}, "uuid-name": "row0"},