as suggested by Ben Pfaff.
Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
/ofproto|INFO|datapath ID changed to fedcba9876543210/d']])
dnl Add bridges, ports, etc.
- AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 datapath-type=dummy other-config:datapath-id=fedcba9876543210 other-config:hwaddr=aa:55:aa:55:00:00 protocols=[[OpenFlow10,OpenFlow12,OpenFlow13]] fail-mode=secure -- $1 m4_if([$2], [], [], [| perl $srcdir/uuidfilt.pl])], [0], [$2])
+ AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 datapath-type=dummy other-config:datapath-id=fedcba9876543210 other-config:hwaddr=aa:55:aa:55:00:00 protocols=[[OpenFlow10,OpenFlow12,OpenFlow13]] fail-mode=secure -- $1 m4_if([$2], [], [], [| ${PERL} $srcdir/uuidfilt.pl])], [0], [$2])
])
m4_divert_push([PREPARE_TESTS])
-- --id=@t0 create Flow_Table name=main \
-- --id=@t1 create Flow_Table flow-limit=1024 \
-- set bridge br0 'flow_tables={1=@t1,0=@t0}' \
- | perl $srcdir/uuidfilt.pl],
+ | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
<1>
])
-- --id=@t0 create Flow_Table name=main \
-- --id=@t1 create Flow_Table flow-limit=1024 \
-- set bridge br0 'flow_tables={1=@t1,0=@t0}' \
- | perl $srcdir/uuidfilt.pl],
+ | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
<1>
])
[ovs-vsctl \
-- --id=@t0 create Flow_Table flow-limit=4 \
-- set bridge br0 flow_tables:0=@t0 \
- | perl $srcdir/uuidfilt.pl],
+ | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
[ovs-vsctl \
-- --id=@t0 create Flow_Table flow-limit=4 \
-- set bridge br0 flow_tables:0=@t0 \
- | perl $srcdir/uuidfilt.pl],
+ | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
[ovs-vsctl \
-- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
-- set bridge br0 flow_tables:0=@t0 \
- | perl $srcdir/uuidfilt.pl],
+ | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
[ovs-vsctl \
-- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
-- set bridge br0 flow_tables:0=@t0 \
- | perl $srcdir/uuidfilt.pl],
+ | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
overflow-policy=evict \
groups='"NXM_OF_IN_PORT[[]]"' \
-- set bridge br0 flow_tables:0=@t0 \
- | perl $srcdir/uuidfilt.pl],
+ | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
overflow-policy=evict \
groups='"NXM_OF_IN_PORT[[]]"' \
-- set bridge br0 flow_tables:0=@t0 \
- | perl $srcdir/uuidfilt.pl],
+ | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
}
print $_ foreach sort(@buffer);
'
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log | perl -e "$sort"], [0],
+AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log | ${PERL} -e "$sort"], [0],
[NXST_FLOW_MONITOR reply (xid=0x0):
event=ADDED table=0 cookie=0 in_port=0,dl_vlan=124 actions=output:2
NXST_FLOW_MONITOR reply (xid=0x0):
# Add $n_msgs flows.
(echo "in_port=2,actions=output:2"
-perl -e '
+${PERL} -e '
for ($i = 0; $i < '$n_msgs'; $i++) {
print "cookie=1,reg1=$i,actions=drop\n";
}
AT_CHECK([RUN_OVS_VSCTL([list b], [get b br0 _uuid])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
cp stdout out2
-AT_CHECK([perl $srcdir/uuidfilt.pl out1 out2], [0],
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl out1 out2], [0],
[[<0>
_uuid : <0>
cp stdout netflow-uuid
AT_CHECK([RUN_OVS_VSCTL([list netflow `cat netflow-uuid`])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
-AT_CHECK([perl $srcdir/uuidfilt.pl netflow-uuid stdout], [0],
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl netflow-uuid stdout], [0],
[[<0>
_uuid : <0>
[--id=@m create mirror name=mymirror select-dst-port=@eth0 select-src-port=@eth0 output-port=@eth1])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
AT_CHECK(
- [perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+ [${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
[list bridge br0])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
AT_CHECK(
- [sed -n -e '/uuid/p' -e '/name/p' -e '/mirrors/p' -e '/select/p' -e '/output/p' < stdout | perl $srcdir/uuidfilt.pl], [0], [dnl
+ [sed -n -e '/uuid/p' -e '/name/p' -e '/mirrors/p' -e '/select/p' -e '/output/p' < stdout | ${PERL} $srcdir/uuidfilt.pl], [0], [dnl
[_uuid : <0>
name : "eth0"
_uuid : <1>
OVS_VSCTL_SETUP
AT_CHECK(
[ovs-vsctl -vPATTERN:console:'%c|%p|%m' --no-wait -vreconnect:emer --db=unix:socket \
- -- create Bridge name=br0 | perl $srcdir/uuidfilt.pl],
+ -- create Bridge name=br0 | ${PERL} $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' --no-wait -vreconnect:emer --db=unix:socket \
- -- --id=@br0 create Bridge name=br0 | perl $srcdir/uuidfilt.pl],
+ -- --id=@br0 create Bridge name=br0 | ${PERL} $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])
-- --id=@eth0 create Port name=eth0 interfaces=@eth0_iface \
-- --id=@m0 create Mirror name=m0 output_port=@eth0 \
-- --id=@br0 create Bridge name=br0 mirrors=@m0 \
- -- set Open_vSwitch . bridges=@br0 | perl $srcdir/uuidfilt.pl],
+ -- set Open_vSwitch . bridges=@br0 | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
<1>
<2>
OVS_VSCTL_SETUP
AT_CHECK([RUN_OVS_VSCTL([--id=@br0 create Bridge name=br0 -- add Open_vSwitch . bridges @br0 -- list b])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0],
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0],
[[<0>
_uuid : <1>
controller : []
OVS_RUNDIR=`pwd`; export OVS_RUNDIR
AT_CHECK([test-ovsdb execute "`$2`" m4_foreach([txn], [$3], [ 'txn'])],
[0], [stdout], [])
- AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [$4])
+ AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [$4])
AT_CLEANUP])
OVSDB_CHECK_EXECUTION([uuid-name must be <id>],
[AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore], [kill `cat pid`])])
AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl unix:socket $3],
[0], [stdout], [ignore], [kill `cat pid`])
- AT_CHECK([sort stdout | perl $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
+ AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
[0], [$4], [], [kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
[AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore], [kill `cat pid`])])
AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema unix:socket $3],
[0], [stdout], [ignore], [kill `cat pid`])
- AT_CHECK([sort stdout | perl $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
+ AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
[0], [$4], [], [kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
[AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT $2], [0], [ignore], [ignore], [kill `cat pid`])])
AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema tcp:127.0.0.1:$TCP_PORT $3],
[0], [stdout], [ignore], [kill `cat pid`])
- AT_CHECK([sort stdout | perl $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
+ AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
[0], [$4], [], [kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
[ignore], [ignore], [kill `cat server-pid client-pid`])
AT_CHECK([ovs-appctl -t "`pwd`"/unixctl -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e server-pid && test ! -e client-pid])
- AT_CHECK([perl $srcdir/ovsdb-monitor-sort.pl < output | perl $srcdir/uuidfilt.pl], [0], [$7], [ignore])
+ AT_CHECK([${PERL} $srcdir/ovsdb-monitor-sort.pl < output | ${PERL} $srcdir/uuidfilt.pl], [0], [$7], [ignore])
AT_CLEANUP])
OVSDB_CHECK_MONITOR([monitor insert into empty table],
[test ! -e pid || kill `cat pid`])
cat stdout >> output
])
- AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
+ AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
[test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
]])
AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [])
cat stdout >> output
-AT_CHECK([perl $srcdir/uuidfilt.pl output], [0],
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0],
[[[{"uuid":["uuid","<0>"]}]
[{"uuid":["uuid","<1>"]}]
[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
]])
AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [])
cat stdout >> output
-AT_CHECK([perl $srcdir/uuidfilt.pl output], [0],
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0],
[[[{"uuid":["uuid","<0>"]}]
[{"uuid":["uuid","<1>"]}]
[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
"columns": ["target", "is_connected"]}]']],
[0], [stdout], [ignore])
AT_CHECK(
- [perl $srcdir/uuidfilt.pl stdout],
+ [${PERL} $srcdir/uuidfilt.pl stdout],
[0],
[[[{"rows":[{"managers":"punix:socket1"}]},{"rows":[{"is_connected":false,"target":"punix:socket2"}]}]
]],
[0], [stdout], [ignore], [test ! -e pid || kill `cat pid`])
cat stdout >> output
AT_CHECK_UNQUOTED(
- [perl $srcdir/uuidfilt.pl output], [0],
+ [${PERL} $srcdir/uuidfilt.pl output], [0],
[[[{"rows":[{"private_key":"$PKIDIR/testpki-privkey2.pem"}]}]
]], [ignore], [test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
done]],
[0], [stdout], [ignore], [test ! -e pid || kill `cat pid`])
dnl Check that all the crap is in fact in the database log.
-AT_CHECK([[perl $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
+AT_CHECK([[${PERL} $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
[[{"cksum":"12345678 9","name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}},"indexes":[["number"]]}},"version":"5.1.3"}
{"_comment":"add row for zero 0","_date":0,"ordinals":{"<0>":{"name":"zero"}}}
{"_comment":"delete row for 0","_date":0,"ordinals":{"<0>":null}}
dnl Dump out and check the actual database contents.
AT_CHECK([[ovsdb-client dump unix:socket ordinals]],
[0], [stdout], [ignore])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
dnl And check that the dumped data is the same too:
AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore],
[test ! -e pid || kill `cat pid`])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
dnl Then check that the dumped data is correct.
AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore],
[test ! -e pid || kill `cat pid`])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
[test ! -e pid || kill `cat pid`])
cat stdout >> output
])
- AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
+ AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
[test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
[test ! -e pid || kill `cat pid`])
cat stdout >> output
])
- AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
+ AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
[test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [ignore])
cat stdout >> output
])
- AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore])
+ AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4], [ignore])
AT_CLEANUP])
EXECUTION_EXAMPLES
[AT_CHECK([ovsdb-tool transact db 'txn'], [0], [stdout], [ignore])
cat stdout >> output
])
- AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4])
+ AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4])
AT_CLEANUP])
EXECUTION_EXAMPLES
"row": {"name": "five", "number": 5}},
{"op": "comment",
"comment": "add row for 5"}]']], [0], [stdout], [ignore])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0],
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0],
[[[{"uuid":["uuid","<0>"]},{}]
]])
AT_CHECK([grep "add row for 5" db], [0], [ignore])
done]],
[0], [stdout], [ignore])
dnl Check that all the crap is in fact in the database log.
-AT_CHECK([[perl $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
+AT_CHECK([[${PERL} $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
[[{"cksum":"12345678 9","name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}},"indexes":[["number"]]}},"version":"5.1.3"}
{"_comment":"add row for zero 0","_date":0,"ordinals":{"<0>":{"name":"zero"}}}
{"_comment":"delete row for 0","_date":0,"ordinals":{"<0>":null}}
dnl Dump out and check the actual database contents.
AT_CHECK([[ovsdb-server --unixctl="`pwd`"/unixctl --remote=punix:socket --run "ovsdb-client dump unix:socket ordinals" db]],
[0], [stdout], [ignore])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
dnl And check that the dumped data is the same too:
AT_CHECK([[ovsdb-server --unixctl="`pwd`"/unixctl --remote=punix:socket --run "ovsdb-client dump unix:socket ordinals" db]],
[0], [stdout], [ignore])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
dnl Dump out and check the actual database contents.
AT_CHECK([[ovsdb-server --unixctl="`pwd`"/unixctl --remote=punix:socket --run "ovsdb-client dump unix:socket ordinals" db]],
[0], [stdout], [ignore])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
dnl And check that the dumped data is the same except for the removed column:
AT_CHECK([[ovsdb-server --unixctl="`pwd`"/unixctl --remote=punix:socket --run "ovsdb-client dump unix:socket ordinals" db]],
[0], [stdout], [ignore])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid number
------------------------------------ ------
dnl Dump out and check the actual database contents.
AT_CHECK([[ovsdb-server --unixctl="`pwd`"/unixctl --remote=punix:socket --run "ovsdb-client dump unix:socket ordinals" db]],
[0], [stdout], [ignore])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid number
------------------------------------ ------
dnl And check that the dumped data is the same except for the added column:
AT_CHECK([[ovsdb-server --unixctl="`pwd`"/unixctl --remote=punix:socket --run "ovsdb-client dump unix:socket ordinals" db]],
[0], [stdout], [ignore])
-AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
+AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ---- ------
[AT_SETUP([$1])
AT_KEYWORDS([ovsdb execute execution trigger positive $4])
AT_CHECK([test-ovsdb trigger $2], [0], [stdout], [])
- AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [$3])
+ AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [$3])
AT_CLEANUP])
OVSDB_CHECK_TRIGGER([trigger fires immediately],