X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fovs-vsctl.at;h=e90361915a5ca4d2b3befc9f44301f78b67b3904;hb=8e61c1104eddbe737a67cbf559fcb48971f59569;hp=7872bfee69668cb997420bbe6c3ee99dd273ec0b;hpb=eeb8467eec55dc5808bfc4ca1e1f6a49275c51d5;p=openvswitch diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at index 7872bfee..e9036191 100644 --- a/tests/ovs-vsctl.at +++ b/tests/ovs-vsctl.at @@ -4,7 +4,7 @@ dnl Creates an empty database in the current directory and then starts dnl an ovsdb-server on it for ovs-vsctl to connect to. m4_define([OVS_VSCTL_SETUP], [OVSDB_INIT([db]) - AT_CHECK([ovsdb-server --detach --pidfile="`pwd`"/pid --remote=punix:socket --unixctl="`pwd`"/unixctl db >/dev/null 2>&1], [0], [ignore], [ignore])]) + AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid --remote=punix:socket --unixctl="`pwd`"/unixctl db >/dev/null 2>&1], [0], [ignore], [ignore])]) dnl OVS_VSCTL_CLEANUP dnl @@ -15,17 +15,17 @@ dnl RUN_OVS_VSCTL(COMMAND, ...) dnl dnl Executes each ovs-vsctl COMMAND. m4_define([RUN_OVS_VSCTL], - [m4_foreach([command], [$@], [ovs-vsctl --timeout=5 --no-wait -vreconnect:ANY:emer --db=unix:socket -- command + [m4_foreach([command], [$@], [ovs-vsctl --timeout=5 --no-wait -vreconnect:emer --db=unix:socket -- command ])]) m4_define([RUN_OVS_VSCTL_ONELINE], - [m4_foreach([command], [$@], [ovs-vsctl --timeout=5 --no-wait -vreconnect:ANY:emer --db=unix:socket --oneline -- command + [m4_foreach([command], [$@], [ovs-vsctl --timeout=5 --no-wait -vreconnect:emer --db=unix:socket --oneline -- command ])]) dnl RUN_OVS_VSCTL_TOGETHER(COMMAND, ...) dnl dnl Executes each ovs-vsctl COMMAND in a single run of ovs-vsctl. m4_define([RUN_OVS_VSCTL_TOGETHER], - [ovs-vsctl --timeout=5 --no-wait -vreconnect:ANY:emer --db=unix:socket --oneline dnl + [ovs-vsctl --timeout=5 --no-wait -vreconnect:emer --db=unix:socket --oneline dnl m4_foreach([command], [$@], [ -- command])]) dnl CHECK_BRIDGES([BRIDGE, PARENT, VLAN], ...) @@ -736,12 +736,24 @@ AT_CHECK([RUN_OVS_VSCTL([clear netflow `cat netflow-uuid` targets])], AT_CHECK([RUN_OVS_VSCTL([destroy b br2])], [1], [], [ovs-vsctl: no row "br2" in table Bridge ], [OVS_VSCTL_CLEANUP]) +AT_CHECK([RUN_OVS_VSCTL([add i br1 name x])], + [1], [], [ovs-vsctl: cannot modify read-only column name in table Interface +], [OVS_VSCTL_CLEANUP]) +AT_CHECK([RUN_OVS_VSCTL([set port br1 name br2])], + [1], [], [ovs-vsctl: cannot modify read-only column name in table Port +], [OVS_VSCTL_CLEANUP]) +AT_CHECK([RUN_OVS_VSCTL([remove b br1 name br1])], + [1], [], [ovs-vsctl: cannot modify read-only column name in table Bridge +], [OVS_VSCTL_CLEANUP]) +AT_CHECK([RUN_OVS_VSCTL([clear b br1 name])], + [1], [], [ovs-vsctl: cannot modify read-only column name in table Bridge +], [OVS_VSCTL_CLEANUP]) OVS_VSCTL_CLEANUP AT_CLEANUP AT_SETUP([database commands -- conditions]) AT_KEYWORDS([ovs-vsctl]) -trap 'kill `cat pid`' 0 +ON_EXIT([kill `cat pid`]) OVS_VSCTL_SETUP AT_CHECK( [RUN_OVS_VSCTL_TOGETHER( @@ -769,7 +781,7 @@ AT_CHECK( ]) m4_define([VSCTL_CHECK_FIND], - [AT_CHECK([ovs-vsctl --bare --timeout=5 --no-wait -vreconnect:ANY:emer --db=unix:socket -- --columns=name find bridge '$1' | sort | xargs echo], [0], [$2 + [AT_CHECK([echo `ovs-vsctl --bare --timeout=5 --no-wait -vreconnect:emer --db=unix:socket -- --columns=name find bridge '$1' | sort`], [0], [$2 ])]) # Arithmetic relational operators without keys. @@ -896,11 +908,6 @@ AT_CLEANUP AT_SETUP([database commands -- wait-until must wait]) AT_KEYWORDS([ovs-vsctl]) -# Disable lcov for this test. All the programs running in parallel -# race badly on access to profiling data. -DISABLE_LCOV=true -export DISABLE_LCOV - OVS_VSCTL_SETUP # Start ovs-vsctls in background. @@ -985,19 +992,19 @@ AT_SETUP([unreferenced record warnings]) AT_KEYWORDS([ovs-vsctl]) OVS_VSCTL_SETUP AT_CHECK( - [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --timeout=5 --no-wait -vreconnect:ANY:emer --db=unix:socket \ + [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --timeout=5 --no-wait -vreconnect:emer --db=unix:socket \ -- create Bridge name=br0 | $srcdir/uuidfilt.pl], [0], [<0> ], [vsctl|WARN|applying "create" command to table Bridge without --id option will have no effect ], [OVS_VSCTL_CLEANUP]) AT_CHECK( - [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --timeout=5 --no-wait -vreconnect:ANY:emer --db=unix:socket \ + [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --timeout=5 --no-wait -vreconnect:emer --db=unix:socket \ -- --id=@br0 create Bridge name=br0 | $srcdir/uuidfilt.pl], [0], [<0> ], [vsctl|WARN|row id "@br0" was created but no reference to it was inserted, so it will not actually appear in the database ], [OVS_VSCTL_CLEANUP]) AT_CHECK( - [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --timeout=5 --no-wait -vreconnect:ANY:emer --db=unix:socket \ + [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --timeout=5 --no-wait -vreconnect:emer --db=unix:socket \ -- --id=@eth0_iface create Interface name=eth0 \ -- --id=@eth0 create Port name=eth0 interfaces=@eth0_iface \ -- --id=@m0 create Mirror name=m0 output_port=@eth0 \