]> git.proxmox.com Git - ovs.git/blame - tests/ovsdb-transaction.at
system-kmod-macros: Load TFTP module.
[ovs.git] / tests / ovsdb-transaction.at
CommitLineData
f85f8ebb
BP
1AT_BANNER([OVSDB -- transactions])
2
3OVSDB_CHECK_POSITIVE([empty table, empty transaction],
4 [[transact \
5 '["print"]' \
6 '["commit"]' \
7 '["print"]' \
8 '["abort"]' \
9 '["print"]']],
10 [dnl
11print:
12commit:
13print:
14abort:
15print:])
16
17OVSDB_CHECK_POSITIVE([nonempty table, empty transaction],
18 [[transact \
19 '["insert", "1", "2", "3"]' \
20 '["insert", "2", "2", "3"]' \
21 '["print"]' \
22 '["commit"]' \
23 '["print"]' \
24 '["abort"]' \
25 '["print"]']],
26 [dnl
27insert 1 2 3:
28insert 2 2 3:
29print:
301: i=2, j=3
312: i=2, j=3
32commit:
33print:
341: i=2, j=3
352: i=2, j=3
36abort:
37print:
381: i=2, j=3
392: i=2, j=3])
40
41OVSDB_CHECK_POSITIVE([insert, commit],
42 [[transact \
43 '["insert", "1", "2", "3"]' \
44 '["insert", "2", "2", "3"]' \
45 '["commit"]' \
46 '["print"]' \
47 '["insert", "3", "1", "2"]' \
48 '["print"]' \
49 '["commit"]' \
50 '["print"]']],
51 [dnl
52insert 1 2 3:
53insert 2 2 3:
54commit:
55print:
561: i=2, j=3
572: i=2, j=3
58insert 3 1 2:
59print:
601: i=2, j=3
612: i=2, j=3
623: i=1, j=2
63commit:
64print:
651: i=2, j=3
662: i=2, j=3
673: i=1, j=2],
68 [transaction])
69
70OVSDB_CHECK_POSITIVE([insert, abort],
71 [[transact \
72 '["insert", "1", "2", "3"]' \
73 '["insert", "2", "2", "3"]' \
74 '["commit"]' \
75 '["print"]' \
76 '["insert", "3", "1", "2"]' \
77 '["print"]' \
78 '["abort"]' \
79 '["print"]']],
80 [dnl
81insert 1 2 3:
82insert 2 2 3:
83commit:
84print:
851: i=2, j=3
862: i=2, j=3
87insert 3 1 2:
88print:
891: i=2, j=3
902: i=2, j=3
913: i=1, j=2
92abort:
93print:
941: i=2, j=3
952: i=2, j=3],
96 [transaction])
97
98OVSDB_CHECK_POSITIVE([modify, commit],
99 [[transact \
100 '["insert", "1", "2", "3"]' \
101 '["insert", "2", "2", "3"]' \
102 '["commit"]' \
103 '["print"]' \
104 '["modify", "2", "5", "-1"]' \
105 '["modify", "1", "-1", "4"]' \
106 '["print"]' \
107 '["commit"]' \
108 '["print"]']],
109 [dnl
110insert 1 2 3:
111insert 2 2 3:
112commit:
113print:
1141: i=2, j=3
1152: i=2, j=3
116modify 2 5 -1:
117modify 1 -1 4:
118print:
1191: i=2, j=4
1202: i=5, j=3
121commit:
122print:
1231: i=2, j=4
1242: i=5, j=3],
125 [transaction])
126
127OVSDB_CHECK_POSITIVE([modify, abort],
128 [[transact \
129 '["insert", "1", "2", "3"]' \
130 '["insert", "2", "2", "3"]' \
131 '["commit"]' \
132 '["print"]' \
133 '["modify", "2", "5", "-1"]' \
134 '["modify", "1", "-1", "4"]' \
135 '["print"]' \
136 '["abort"]' \
137 '["print"]']],
138 [dnl
139insert 1 2 3:
140insert 2 2 3:
141commit:
142print:
1431: i=2, j=3
1442: i=2, j=3
145modify 2 5 -1:
146modify 1 -1 4:
147print:
1481: i=2, j=4
1492: i=5, j=3
150abort:
151print:
1521: i=2, j=3
1532: i=2, j=3],
154 [transaction])
155
156OVSDB_CHECK_POSITIVE([delete, commit],
157 [[transact \
158 '["insert", "1", "2", "3"]' \
159 '["insert", "2", "2", "3"]' \
160 '["commit"]' \
161 '["print"]' \
162 '["delete", "1"]' \
163 '["print"]' \
164 '["commit"]' \
165 '["print"]']],
166 [dnl
167insert 1 2 3:
168insert 2 2 3:
169commit:
170print:
1711: i=2, j=3
1722: i=2, j=3
173delete 1:
174print:
1752: i=2, j=3
176commit:
177print:
1782: i=2, j=3],
179 [transaction])
180
181OVSDB_CHECK_POSITIVE([delete, abort],
182 [[transact \
183 '["insert", "1", "2", "3"]' \
184 '["insert", "2", "2", "3"]' \
185 '["commit"]' \
186 '["print"]' \
187 '["delete", "1"]' \
188 '["print"]' \
189 '["abort"]' \
190 '["print"]']],
191 [dnl
192insert 1 2 3:
193insert 2 2 3:
194commit:
195print:
1961: i=2, j=3
1972: i=2, j=3
198delete 1:
199print:
2002: i=2, j=3
201abort:
202print:
2031: i=2, j=3
2042: i=2, j=3],
205 [transaction])
206
207OVSDB_CHECK_POSITIVE([modify, delete, commit],
208 [[transact \
209 '["insert", "1", "2", "3"]' \
210 '["insert", "2", "2", "3"]' \
211 '["commit"]' \
212 '["print"]' \
213 '["modify", "1", "5", "6"]' \
214 '["delete", "1"]' \
215 '["print"]' \
216 '["commit"]' \
217 '["print"]']],
218 [dnl
219insert 1 2 3:
220insert 2 2 3:
221commit:
222print:
2231: i=2, j=3
2242: i=2, j=3
225modify 1 5 6:
226delete 1:
227print:
2282: i=2, j=3
229commit:
230print:
2312: i=2, j=3],
232 [transaction])
233
234OVSDB_CHECK_POSITIVE([modify, delete, abort],
235 [[transact \
236 '["insert", "1", "2", "3"]' \
237 '["insert", "2", "2", "3"]' \
238 '["commit"]' \
239 '["print"]' \
240 '["modify", "1", "5", "6"]' \
241 '["delete", "1"]' \
242 '["print"]' \
243 '["abort"]' \
244 '["print"]']],
245 [dnl
246insert 1 2 3:
247insert 2 2 3:
248commit:
249print:
2501: i=2, j=3
2512: i=2, j=3
252modify 1 5 6:
253delete 1:
254print:
2552: i=2, j=3
256abort:
257print:
2581: i=2, j=3
2592: i=2, j=3],
260 [transaction])
261
262OVSDB_CHECK_POSITIVE([insert, delete, commit],
263 [[transact \
264 '["insert", "1", "2", "3"]' \
265 '["insert", "2", "2", "3"]' \
266 '["commit"]' \
267 '["print"]' \
268 '["insert", "3", "5", "6"]' \
269 '["delete", "1"]' \
270 '["delete", "3"]' \
271 '["print"]' \
272 '["commit"]' \
273 '["print"]']],
274 [dnl
275insert 1 2 3:
276insert 2 2 3:
277commit:
278print:
2791: i=2, j=3
2802: i=2, j=3
281insert 3 5 6:
282delete 1:
283delete 3:
284print:
2852: i=2, j=3
286commit:
287print:
2882: i=2, j=3],
289 [transaction])
290
291OVSDB_CHECK_POSITIVE([insert, delete, abort],
292 [[transact \
293 '["insert", "1", "2", "3"]' \
294 '["insert", "2", "2", "3"]' \
295 '["commit"]' \
296 '["print"]' \
297 '["insert", "3", "5", "6"]' \
298 '["delete", "1"]' \
299 '["delete", "3"]' \
300 '["print"]' \
301 '["abort"]' \
302 '["print"]']],
303 [dnl
304insert 1 2 3:
305insert 2 2 3:
306commit:
307print:
3081: i=2, j=3
3092: i=2, j=3
310insert 3 5 6:
311delete 1:
312delete 3:
313print:
3142: i=2, j=3
315abort:
316print:
3171: i=2, j=3
3182: i=2, j=3],
319 [transaction])
320
321
322OVSDB_CHECK_POSITIVE([insert, modify, delete, commit],
323 [[transact \
324 '["insert", "1", "2", "3"]' \
325 '["insert", "2", "2", "3"]' \
326 '["commit"]' \
327 '["print"]' \
328 '["insert", "3", "5", "6"]' \
329 '["delete", "1"]' \
330 '["modify", "3", "7", "8"]' \
331 '["delete", "3"]' \
332 '["print"]' \
333 '["commit"]' \
334 '["print"]']],
335 [dnl
336insert 1 2 3:
337insert 2 2 3:
338commit:
339print:
3401: i=2, j=3
3412: i=2, j=3
342insert 3 5 6:
343delete 1:
344modify 3 7 8:
345delete 3:
346print:
3472: i=2, j=3
348commit:
349print:
3502: i=2, j=3],
351 [transaction])
352
353OVSDB_CHECK_POSITIVE([insert, modify, delete, abort],
354 [[transact \
355 '["insert", "1", "2", "3"]' \
356 '["insert", "2", "2", "3"]' \
357 '["commit"]' \
358 '["print"]' \
359 '["insert", "3", "5", "6"]' \
360 '["delete", "1"]' \
361 '["modify", "3", "7", "8"]' \
362 '["delete", "3"]' \
363 '["print"]' \
364 '["abort"]' \
365 '["print"]']],
366 [dnl
367insert 1 2 3:
368insert 2 2 3:
369commit:
370print:
3711: i=2, j=3
3722: i=2, j=3
373insert 3 5 6:
374delete 1:
375modify 3 7 8:
376delete 3:
377print:
3782: i=2, j=3
379abort:
380print:
3811: i=2, j=3
3822: i=2, j=3],
383 [transaction])
384
ee9e92d8
BP
385OVSDB_CHECK_POSITIVE([deletes are aborted cleanly],
386 [[transact \
387 '["insert", "1", "2", "3"]' \
388 '["commit"]' \
389 '["print"]' \
390 '["delete", "1"]' \
391 '["abort"]' \
392 '["print"]' \
393 '["delete", "1"]' \
394 '["abort"]' \
395 '["print"]']],
396 [dnl
397insert 1 2 3:
398commit:
399print:
4001: i=2, j=3
401delete 1:
402abort:
403print:
4041: i=2, j=3
405delete 1:
406abort:
407print:
4081: i=2, j=3],
409 [transaction])
410