1 AT_BANNER([OVSDB -- atoms without constraints])
3 OVSDB_CHECK_POSITIVE([integer atom from JSON],
4 [[parse-atoms '["integer"]' \
8 '[9223372036854775807]' \
9 '[-9223372036854775808]' ]],
14 -9223372036854775808])
16 OVSDB_CHECK_POSITIVE([integer atom from string],
17 [[parse-atom-strings -- '["integer"]' \
21 '9223372036854775807' \
22 '-9223372036854775808' ]],
27 -9223372036854775808])
29 OVSDB_CHECK_POSITIVE([real atom from JSON],
30 [[parse-atoms '["real"]' \
46 OVSDB_CHECK_POSITIVE([real atom from string],
47 [[parse-atom-strings -- '["real"]' \
63 OVSDB_CHECK_POSITIVE([boolean atom from JSON],
64 [[parse-atoms '["boolean"]' '[true]' '[false]' ]],
68 OVSDB_CHECK_POSITIVE([boolean atom from string],
69 [[parse-atom-strings '["boolean"]' 'true' 'false' ]],
73 OVSDB_CHECK_POSITIVE([string atom from JSON],
74 [[parse-atoms '["string"]' '[""]' '["true"]' '["\"\\\/\b\f\n\r\t"]']],
79 OVSDB_CHECK_POSITIVE([string atom from string],
80 [[parse-atom-strings '["string"]' \
86 '"\"\\\/\b\f\n\r\t"']],
94 OVSDB_CHECK_POSITIVE([uuid atom from JSON],
95 [[parse-atoms '["uuid"]' '["uuid", "550e8400-e29b-41d4-a716-446655440000"]']],
96 [[["uuid","550e8400-e29b-41d4-a716-446655440000"]]])
98 OVSDB_CHECK_POSITIVE([uuid atom from string],
99 [[parse-atom-strings '["uuid"]' '550e8400-e29b-41d4-a716-446655440000']],
100 [550e8400-e29b-41d4-a716-446655440000])
102 OVSDB_CHECK_POSITIVE([integer atom sorting],
103 [[sort-atoms '["integer"]' '[55,0,-1,2,1]']],
106 OVSDB_CHECK_POSITIVE([real atom sorting],
107 [[sort-atoms '["real"]' '[1.25,1.23,0.0,-0.0,-1e99]']],
108 [[[-1e+99,0,0,1.23,1.25]]])
110 OVSDB_CHECK_POSITIVE([boolean atom sorting],
111 [[sort-atoms '["boolean"]' '[true,false,true,false,false]']],
112 [[[false,false,false,true,true]]])
114 OVSDB_CHECK_POSITIVE([string atom sorting],
115 [[sort-atoms '["string"]' '["abd","abc","\b","xxx"]']],
116 [[["\b","abc","abd","xxx"]]])
118 OVSDB_CHECK_POSITIVE([uuid atom sorting],
119 [[sort-atoms '["uuid"]' '[
120 ["uuid", "00000000-0000-0000-0000-000000000001"],
121 ["uuid", "00000000-1000-0000-0000-000000000000"],
122 ["uuid", "00000000-0000-1000-0000-000000000000"],
123 ["uuid", "00010000-0000-0000-0000-000000000000"],
124 ["uuid", "00000000-0000-0000-0000-000000000100"],
125 ["uuid", "00000000-0000-0000-0000-000100000000"],
126 ["uuid", "00000000-0000-0010-0000-000000000000"],
127 ["uuid", "00000100-0000-0000-0000-000000000000"],
128 ["uuid", "00000000-0000-0001-0000-000000000000"],
129 ["uuid", "00000000-0000-0000-0000-000001000000"],
130 ["uuid", "01000000-0000-0000-0000-000000000000"],
131 ["uuid", "00000000-0000-0000-0000-000000001000"],
132 ["uuid", "00000000-0000-0000-0000-000010000000"],
133 ["uuid", "00000000-0000-0000-0000-010000000000"],
134 ["uuid", "00000000-0000-0100-0000-000000000000"],
135 ["uuid", "10000000-0000-0000-0000-000000000000"],
136 ["uuid", "00000000-0000-0000-0000-000000000010"],
137 ["uuid", "00000000-0100-0000-0000-000000000000"],
138 ["uuid", "00000000-0000-0000-0100-000000000000"],
139 ["uuid", "00000000-0000-0000-0001-000000000000"],
140 ["uuid", "00000010-0000-0000-0000-000000000000"],
141 ["uuid", "00000000-0000-0000-0010-000000000000"],
142 ["uuid", "00000000-0000-0000-0000-000000010000"],
143 ["uuid", "00000000-0000-0000-1000-000000000000"],
144 ["uuid", "00000000-0000-0000-0000-100000000000"],
145 ["uuid", "00000000-0000-0000-0000-001000000000"],
146 ["uuid", "00000000-0000-0000-0000-000000100000"],
147 ["uuid", "00000000-0000-0000-0000-000000000000"],
148 ["uuid", "00000000-0010-0000-0000-000000000000"],
149 ["uuid", "00100000-0000-0000-0000-000000000000"],
150 ["uuid", "00000000-0001-0000-0000-000000000000"],
151 ["uuid", "00000001-0000-0000-0000-000000000000"],
152 ["uuid", "00001000-0000-0000-0000-000000000000"]]']],
153 [[[["uuid","00000000-0000-0000-0000-000000000000"],["uuid","00000000-0000-0000-0000-000000000001"],["uuid","00000000-0000-0000-0000-000000000010"],["uuid","00000000-0000-0000-0000-000000000100"],["uuid","00000000-0000-0000-0000-000000001000"],["uuid","00000000-0000-0000-0000-000000010000"],["uuid","00000000-0000-0000-0000-000000100000"],["uuid","00000000-0000-0000-0000-000001000000"],["uuid","00000000-0000-0000-0000-000010000000"],["uuid","00000000-0000-0000-0000-000100000000"],["uuid","00000000-0000-0000-0000-001000000000"],["uuid","00000000-0000-0000-0000-010000000000"],["uuid","00000000-0000-0000-0000-100000000000"],["uuid","00000000-0000-0000-0001-000000000000"],["uuid","00000000-0000-0000-0010-000000000000"],["uuid","00000000-0000-0000-0100-000000000000"],["uuid","00000000-0000-0000-1000-000000000000"],["uuid","00000000-0000-0001-0000-000000000000"],["uuid","00000000-0000-0010-0000-000000000000"],["uuid","00000000-0000-0100-0000-000000000000"],["uuid","00000000-0000-1000-0000-000000000000"],["uuid","00000000-0001-0000-0000-000000000000"],["uuid","00000000-0010-0000-0000-000000000000"],["uuid","00000000-0100-0000-0000-000000000000"],["uuid","00000000-1000-0000-0000-000000000000"],["uuid","00000001-0000-0000-0000-000000000000"],["uuid","00000010-0000-0000-0000-000000000000"],["uuid","00000100-0000-0000-0000-000000000000"],["uuid","00001000-0000-0000-0000-000000000000"],["uuid","00010000-0000-0000-0000-000000000000"],["uuid","00100000-0000-0000-0000-000000000000"],["uuid","01000000-0000-0000-0000-000000000000"],["uuid","10000000-0000-0000-0000-000000000000"]]]])
155 OVSDB_CHECK_POSITIVE([real not acceptable integer JSON atom],
156 [[parse-atoms '["integer"]' '[0.5]' ]],
157 [syntax "0.5": syntax error: expected integer])
159 dnl <C0> is not allowed anywhere in a UTF-8 string.
160 dnl <ED A0 80> is a surrogate and not allowed in UTF-8.
161 OVSDB_CHECK_POSITIVE([no invalid UTF-8 sequences in strings],
162 [parse-atoms '[["string"]]' \
163 '@<:@"m4_esyscmd([printf "\xc0"])"@:>@' \
164 '@<:@"m4_esyscmd([printf "\xed\xa0\x80"])"@:>@' \
166 [constraint violation: "m4_esyscmd([printf "\xc0"])" is not a valid UTF-8 string: invalid UTF-8 sequence 0xc0
167 constraint violation: "m4_esyscmd([printf "\xed\xa0\x80"])" is not a valid UTF-8 string: invalid UTF-8 sequence 0xed 0xa0])
169 OVSDB_CHECK_NEGATIVE([real not acceptable integer string atom],
170 [[parse-atom-strings '["integer"]' '0.5' ]],
171 ["0.5" is not a valid integer])
173 OVSDB_CHECK_POSITIVE([string "true" not acceptable boolean JSON atom],
174 [[parse-atoms '["boolean"]' '["true"]' ]],
175 [syntax ""true"": syntax error: expected boolean])
177 OVSDB_CHECK_NEGATIVE([string "true" not acceptable boolean string atom],
178 [[parse-atom-strings '["boolean"]' '"true"' ]],
179 [""true"" is not a valid boolean (use "true" or "false")])
181 OVSDB_CHECK_POSITIVE([integer not acceptable string JSON atom],
182 [[parse-atoms '["string"]' '[1]']],
183 [syntax "1": syntax error: expected string])
185 OVSDB_CHECK_POSITIVE([uuid atom must be expressed as JSON array],
186 [[parse-atoms '["uuid"]' '["550e8400-e29b-41d4-a716-446655440000"]']],
187 [[syntax ""550e8400-e29b-41d4-a716-446655440000"": syntax error: expected ["uuid", <string>]]])
189 OVSDB_CHECK_NEGATIVE([empty string atom must be quoted],
190 [[parse-atom-strings '["string"]' '']],
191 [An empty string is not valid as input; use "" to represent the empty string])
193 OVSDB_CHECK_NEGATIVE([quotes must be balanced],
194 [parse-atom-strings '[["string"]]' '"asdf'],
195 ["asdf: missing quote at end of quoted string])
197 OVSDB_CHECK_NEGATIVE([uuids must be valid],
198 [parse-atom-strings '[["uuid"]]' '1234-5678'],
199 ["1234-5678" is not a valid UUID])
201 AT_BANNER([OVSDB -- atoms with constraints])
203 OVSDB_CHECK_POSITIVE([integers >= 5],
204 [[parse-atoms '[{"type": "integer", "minInteger": 5}]' \
210 [constraint violation: 0 is less than minimum allowed value 5
211 constraint violation: 4 is less than minimum allowed value 5
216 OVSDB_CHECK_POSITIVE([integers <= -1],
217 [[parse-atoms '[{"type": "integer", "maxInteger": -1}]' \
222 [constraint violation: 0 is greater than maximum allowed value -1
227 OVSDB_CHECK_POSITIVE([integers in range -10 to 10],
228 [[parse-atoms '[{"type": "integer", "minInteger": -10, "maxInteger": 10}]' \
238 [constraint violation: -20 is not in the valid range -10 to 10 (inclusive)
239 constraint violation: -11 is not in the valid range -10 to 10 (inclusive)
245 constraint violation: 11 is not in the valid range -10 to 10 (inclusive)
246 constraint violation: 123576 is not in the valid range -10 to 10 (inclusive)])
248 OVSDB_CHECK_POSITIVE([reals >= 5],
249 [[parse-atoms '[{"type": "real", "minReal": 5}]' \
255 [constraint violation: 0 is less than minimum allowed value 5
256 constraint violation: 4 is less than minimum allowed value 5
261 OVSDB_CHECK_POSITIVE([reals <= -1],
262 [[parse-atoms '[{"type": "real", "maxReal": -1}]' \
267 [constraint violation: 0 is greater than maximum allowed value -1
272 OVSDB_CHECK_POSITIVE([reals in range -10 to 10],
273 [[parse-atoms '[{"type": "real", "minReal": -10, "maxReal": 10}]' \
283 [constraint violation: -20 is not in the valid range -10 to 10 (inclusive)
284 constraint violation: -11 is not in the valid range -10 to 10 (inclusive)
290 constraint violation: 11 is not in the valid range -10 to 10 (inclusive)
291 constraint violation: 123576 is not in the valid range -10 to 10 (inclusive)])
293 AT_SETUP([strings matching /(a(b)?)c?/])
294 AT_KEYWORDS([ovsdb positive])
295 if test "$HAVE_PCRE" = yes; then
296 b_out='constraint violation: "b" does not match regular expression /(a(b)?)?c?/'
297 bc_out='constraint violation: "bc" does not match regular expression /(a(b)?)?c?/'
303 [[test-ovsdb parse-atoms '{"type": "string", "reMatch": "(a(b)?)?c?"}' \
324 OVSDB_CHECK_POSITIVE([strings at least 2 characters long],
325 [[parse-atoms '{"type": "string", "minLength": 2}' \
330 '["\ud834\udd1e"]']],
331 [[constraint violation: "" length 0 is less than minimum allowed length 2
332 constraint violation: "a" length 1 is less than minimum allowed length 2
335 constraint violation: "𝄞" length 1 is less than minimum allowed length 2]])
337 OVSDB_CHECK_POSITIVE([strings no more than 2 characters long],
338 [[parse-atoms '{"type": "string", "maxLength": 2}' \
343 '["\ud834\udd1e"]']],
347 constraint violation: "abc" length 3 is greater than maximum allowed length 2
350 AT_BANNER([OSVDB -- simple data])
352 OVSDB_CHECK_POSITIVE([integer JSON datum],
353 [[parse-data '["integer"]' '[0]' '["set",[1]]' '[-1]']],
358 OVSDB_CHECK_POSITIVE([integer string datum],
359 [[parse-data-strings -- '["integer"]' '0' '1' '-1' '+1']],
365 OVSDB_CHECK_POSITIVE([real JSON datum],
366 [[parse-data '["real"]' '[0]' '["set",[1.0]]' '[-1.25]']],
371 OVSDB_CHECK_POSITIVE([real string datum],
372 [[parse-data-strings -- '["real"]' '0' '1.0' '-1.25']],
377 OVSDB_CHECK_POSITIVE([boolean JSON datum],
378 [[parse-data '["boolean"]' '["set", [true]]' '[false]' ]],
382 OVSDB_CHECK_POSITIVE([boolean string datum],
383 [[parse-data-strings '["boolean"]' 'true' 'false' ]],
387 OVSDB_CHECK_POSITIVE([string JSON datum],
388 [[parse-data '["string"]' '["set",[""]]' '["true"]' '["\"\\\/\b\f\n\r\t"]']],
393 OVSDB_CHECK_POSITIVE([string string datum],
394 [[parse-data-strings '["string"]' '"x"' '""' '"true"' '"\"\\\/\b\f\n\r\t"']],
400 AT_BANNER([OVSDB -- set data])
402 OVSDB_CHECK_POSITIVE([JSON optional boolean],
403 [[parse-data '{"key": "boolean", "min": 0}' \
412 OVSDB_CHECK_POSITIVE([string optional boolean],
413 [[parse-data-strings '{"key": "boolean", "min": 0}' \
422 OVSDB_CHECK_POSITIVE([JSON set of 0 or more integers],
423 [[parse-data '{"key": "integer", "min": 0, "max": "unlimited"}' \
427 '["set", [0, 1, 2]]' \
428 '["set", [0, 1, 2, 3, 4, 5]]' \
429 '["set", [0, 1, 2, 3, 4, 5, 6, 7, 8]]' \
430 '["set", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]']],
435 ["set",[0,1,2,3,4,5]]
436 ["set",[0,1,2,3,4,5,6,7,8]]
437 ["set",[0,1,2,3,4,5,6,7,8,9,10]]]])
439 OVSDB_CHECK_POSITIVE([string set of 0 or more integers],
440 [[parse-data-strings '{"key": "integer", "min": 0, "max": "unlimited"}' \
444 '[0, 1,2, 3, 4, 5]' \
445 '0, 1,2, 3,4, 5, 6, 7, 8' \
446 '[0, 1, 2, 3, 4,5, 6,7, 8, 9, 10]']],
451 [0, 1, 2, 3, 4, 5, 6, 7, 8]
452 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]])
454 OVSDB_CHECK_POSITIVE([JSON set of 1 to 3 uuids],
455 [[parse-data '{"key": "uuid", "min": 1, "max": 3}' \
456 '["set", [["uuid", "550e8400-e29b-41d4-a716-446655440000"]]]' \
457 '["uuid", "b5078be0-7664-4299-b836-8bcc03ef941f"]' \
458 '["set", [["uuid", "c5051240-30ff-43ed-b4b9-93cf3f050813"],
459 ["uuid", "90558331-09af-4d2f-a572-509cad2e9088"],
460 ["uuid", "550e8400-e29b-41d4-a716-446655440000"]]]']],
461 [[["uuid","550e8400-e29b-41d4-a716-446655440000"]
462 ["uuid","b5078be0-7664-4299-b836-8bcc03ef941f"]
463 ["set",[["uuid","550e8400-e29b-41d4-a716-446655440000"],["uuid","90558331-09af-4d2f-a572-509cad2e9088"],["uuid","c5051240-30ff-43ed-b4b9-93cf3f050813"]]]]])
465 OVSDB_CHECK_POSITIVE([string set of 1 to 3 uuids],
466 [[parse-data-strings '{"key": "uuid", "min": 1, "max": 3}' \
467 '[550e8400-e29b-41d4-a716-446655440000]' \
468 '[c5051240-30ff-43ed-b4b9-93cf3f050813,
469 90558331-09af-4d2f-a572-509cad2e9088,
470 550e8400-e29b-41d4-a716-446655440000]']],
471 [[[550e8400-e29b-41d4-a716-446655440000]
472 [550e8400-e29b-41d4-a716-446655440000, 90558331-09af-4d2f-a572-509cad2e9088, c5051240-30ff-43ed-b4b9-93cf3f050813]]])
474 OVSDB_CHECK_POSITIVE([JSON set of 0 to 3 strings],
475 [[parse-data '{"key": "string", "min": 0, "max": 3}' \
477 '["a longer string"]' \
478 '["set", ["a relatively long string"]]' \
479 '["set", ["short string", "a relatively long string"]]' \
480 '["set", ["zzz", "short string", "a relatively long string"]]']],
483 "a relatively long string"
484 ["set",["a relatively long string","short string"]]
485 ["set",["a relatively long string","short string","zzz"]]]])
487 OVSDB_CHECK_POSITIVE([string set of 0 to 3 strings],
488 [[parse-data-strings '{"key": "string", "min": 0, "max": 3}' \
490 '"a relatively long string"' \
491 '["short string", "a relatively long string"]' \
492 '"zzz","short string","a relatively long string"']],
494 ["a relatively long string"]
495 ["a relatively long string", "short string"]
496 ["a relatively long string", "short string", zzz]]])
498 OVSDB_CHECK_NEGATIVE([duplicate boolean not allowed in JSON set],
499 [[parse-data '{"key": "boolean", "max": 5}' '["set", [true, true]]']],
500 [ovsdb error: set contains duplicate])
502 OVSDB_CHECK_NEGATIVE([duplicate boolean not allowed in string set],
503 [[parse-data-strings '{"key": "boolean", "max": 5}' 'true, true']],
504 [set contains duplicate value])
506 OVSDB_CHECK_NEGATIVE([duplicate integer not allowed in JSON set],
507 [[parse-data '{"key": "integer", "max": 5}' '["set", [1, 2, 3, 1]]']],
508 [ovsdb error: set contains duplicate])
510 OVSDB_CHECK_NEGATIVE([duplicate integer not allowed in string set],
511 [[parse-data-strings '{"key": "integer", "max": 5}' '[1, 2, 3, 1]']],
512 [set contains duplicate value])
514 OVSDB_CHECK_NEGATIVE([duplicate real not allowed in JSON set],
515 [[parse-data '{"key": "real", "max": 5}' '["set", [0.0, -0.0]]']],
516 [ovsdb error: set contains duplicate])
518 OVSDB_CHECK_NEGATIVE([duplicate real not allowed in string set],
519 [[parse-data-strings '{"key": "real", "max": 5}' '0.0, -0.0']],
520 [set contains duplicate value])
522 OVSDB_CHECK_NEGATIVE([duplicate string not allowed in JSON set],
523 [[parse-data '{"key": "string", "max": 5}' '["set", ["asdf", "ASDF", "asdf"]]']],
524 [ovsdb error: set contains duplicate])
526 OVSDB_CHECK_NEGATIVE([duplicate string not allowed in string set],
527 [[parse-data-strings '{"key": "string", "max": 5}' 'asdf, ASDF, "asdf"']],
528 [set contains duplicate value])
530 OVSDB_CHECK_NEGATIVE([duplicate uuid not allowed in JSON set],
531 [[parse-data '{"key": "uuid", "max": 5}' \
532 '["set", [["uuid", "7ef21525-0088-4a28-a418-5518413e43ea"],
533 ["uuid", "355ad037-f1da-40aa-b47c-ff9c7e8c6a38"],
534 ["uuid", "7ef21525-0088-4a28-a418-5518413e43ea"]]]']],
535 [ovsdb error: set contains duplicate])
537 OVSDB_CHECK_NEGATIVE([duplicate uuid not allowed in string set],
538 [[parse-data-strings '{"key": "uuid", "max": 5}' \
539 '7ef21525-0088-4a28-a418-5518413e43ea,
540 355ad037-f1da-40aa-b47c-ff9c7e8c6a38,
541 7ef21525-0088-4a28-a418-5518413e43ea']],
542 [set contains duplicate value])
544 AT_BANNER([OVSDB -- map data])
546 OVSDB_CHECK_POSITIVE([JSON map of 1 integer to boolean],
547 [[parse-data '{"key": "integer", "value": "boolean"}' \
548 '["map", [[1, true]]]']],
549 [[["map",[[1,true]]]]])
551 OVSDB_CHECK_POSITIVE([string map of 1 integer to boolean],
552 [[parse-data-strings '{"key": "integer", "value": "boolean"}' \
556 OVSDB_CHECK_POSITIVE([JSON map of at least 1 integer to boolean],
557 [[parse-data '{"key": "integer", "value": "boolean", "max": "unlimited"}' \
558 '["map", [[1, true]]]' \
559 '["map", [[0, true], [1, false], [2, true], [3, true], [4, true]]]' \
560 '["map", [[3, false], [0, true], [4, false]]]']],
562 ["map",[[0,true],[1,false],[2,true],[3,true],[4,true]]]
563 ["map",[[0,true],[3,false],[4,false]]]]])
565 OVSDB_CHECK_POSITIVE([string map of at least 1 integer to boolean],
566 [[parse-data-strings '{"key": "integer", "value": "boolean", "max": "unlimited"}' \
568 '0=true 1=false 2=true, 3=true 4=true,' \
569 '3=false,0=true ,4=false']],
571 {0=true, 1=false, 2=true, 3=true, 4=true}
572 {0=true, 3=false, 4=false}]])
574 OVSDB_CHECK_POSITIVE([JSON map of 1 boolean to integer],
575 [[parse-data '{"key": "boolean", "value": "integer"}' \
576 '["map", [[true, 1]]]']],
577 [[["map",[[true,1]]]]])
579 OVSDB_CHECK_POSITIVE([string map of 1 boolean to integer],
580 [[parse-data-strings '{"key": "boolean", "value": "integer"}' \
584 OVSDB_CHECK_POSITIVE([JSON map of 1 uuid to real],
585 [[parse-data '{"key": "uuid", "value": "real", "min": 1, "max": 5}' \
586 '["map", [[["uuid", "cad8542b-6ee1-486b-971b-7dcbf6e14979"], 1.0],
587 [["uuid", "6b94b968-2702-4f64-9457-314a34d69b8c"], 2.0],
588 [["uuid", "d2c4a168-24de-47eb-a8a3-c1abfc814979"], 3.0],
589 [["uuid", "25bfa475-d072-4f60-8be1-00f48643e9cb"], 4.0],
590 [["uuid", "1c92b8ca-d5e4-4628-a85d-1dc2d099a99a"], 5.0]]]']],
591 [[["map",[[["uuid","1c92b8ca-d5e4-4628-a85d-1dc2d099a99a"],5],[["uuid","25bfa475-d072-4f60-8be1-00f48643e9cb"],4],[["uuid","6b94b968-2702-4f64-9457-314a34d69b8c"],2],[["uuid","cad8542b-6ee1-486b-971b-7dcbf6e14979"],1],[["uuid","d2c4a168-24de-47eb-a8a3-c1abfc814979"],3]]]]])
593 OVSDB_CHECK_POSITIVE([string map of 1 uuid to real],
594 [[parse-data-strings '{"key": "uuid", "value": "real", "min": 1, "max": 5}' \
595 'cad8542b-6ee1-486b-971b-7dcbf6e14979=1.0,
596 6b94b968-2702-4f64-9457-314a34d69b8c=2.0,
597 d2c4a168-24de-47eb-a8a3-c1abfc814979=3.0,
598 25bfa475-d072-4f60-8be1-00f48643e9cb=4.0,
599 1c92b8ca-d5e4-4628-a85d-1dc2d099a99a=5.0']],
600 [[{1c92b8ca-d5e4-4628-a85d-1dc2d099a99a=5, 25bfa475-d072-4f60-8be1-00f48643e9cb=4, 6b94b968-2702-4f64-9457-314a34d69b8c=2, cad8542b-6ee1-486b-971b-7dcbf6e14979=1, d2c4a168-24de-47eb-a8a3-c1abfc814979=3}]])
602 OVSDB_CHECK_POSITIVE([JSON map of 10 string to string],
603 [[parse-data '{"key": "string", "value": "string", "min": 1, "max": 10}' \
604 '["map", [["2 gills", "1 chopin"],
605 ["2 chopins", "1 pint"],
606 ["2 pints", "1 quart"],
607 ["2 quarts", "1 pottle"],
608 ["2 pottles", "1 gallon"],
609 ["2 gallons", "1 peck"],
610 ["2 pecks", "1 demibushel"],
611 ["2 demibushel", "1 firkin"],
612 ["2 firkins", "1 kilderkin"],
613 ["2 kilderkins", "1 barrel"]]]']],
614 [[["map",[["2 chopins","1 pint"],["2 demibushel","1 firkin"],["2 firkins","1 kilderkin"],["2 gallons","1 peck"],["2 gills","1 chopin"],["2 kilderkins","1 barrel"],["2 pecks","1 demibushel"],["2 pints","1 quart"],["2 pottles","1 gallon"],["2 quarts","1 pottle"]]]]])
616 OVSDB_CHECK_POSITIVE([string map of 10 string to string],
617 [[parse-data-strings '{"key": "string", "value": "string", "min": 1, "max": 10}' \
618 '{"2 gills"="1 chopin",
619 "2 chopins"= "1 pint",
620 "2 pints"= "1 quart",
621 "2 quarts"= "1 pottle",
622 "2 pottles"= "1 gallon",
623 "2 gallons"= "1 peck",
624 "2 pecks"= "1 demibushel",
625 "2 demibushel"= "1 firkin",
626 "2 firkins"= "1 kilderkin",
627 "2 kilderkins"= "1 barrel"}']],
628 [[{"2 chopins"="1 pint", "2 demibushel"="1 firkin", "2 firkins"="1 kilderkin", "2 gallons"="1 peck", "2 gills"="1 chopin", "2 kilderkins"="1 barrel", "2 pecks"="1 demibushel", "2 pints"="1 quart", "2 pottles"="1 gallon", "2 quarts"="1 pottle"}]])
630 OVSDB_CHECK_NEGATIVE([duplicate integer key not allowed in JSON map],
631 [[parse-data '{"key": "integer", "value": "boolean", "max": 5}' \
632 '["map", [[1, true], [2, false], [1, false]]]']],
633 [ovsdb error: map contains duplicate key])
635 OVSDB_CHECK_NEGATIVE([duplicate integer key not allowed in string map],
636 [[parse-data-strings '{"key": "integer", "value": "boolean", "max": 5}' \
637 '1=true 2=false 1=false']],
638 [map contains duplicate key])