X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-ovsdb.py;h=1350ccdef4d6f4ece0aa8d3e392e2049a808ecac;hb=a6f639f8080fe18120bb205609c6e364f6de7e70;hp=b0e42a35dc764ea3d1ae8a28006e73b9eec21744;hpb=bf42f674e77a4cb01863b3f975d3258b3c89dd58;p=openvswitch diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py index b0e42a35..1350ccde 100644 --- a/tests/test-ovsdb.py +++ b/tests/test-ovsdb.py @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2010, 2011 Nicira Networks +# Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -292,11 +292,17 @@ def idl_set(idl, commands, step): '"%s"\n' % args[1]) sys.exit(1) elif name == "increment": - if len(args) != 2: - sys.stderr.write('"increment" command requires 2 arguments\n') + if len(args) != 1: + sys.stderr.write('"increment" command requires 1 argument\n') + sys.exit(1) + + s = idltest_find_simple(idl, int(args[0])) + if not s: + sys.stderr.write('"set" command asks for nonexistent i=%d\n' + % int(args[0])) sys.exit(1) - txn.increment(args[0], args[1], []) + s.increment("i") increment = True elif name == "abort": txn.abort()