ordinals
], [ignore], [test ! -e pid || kill `cat pid`])
AT_CHECK(
- [[test-jsonrpc request unix:socket get_schema [\"nonexistent\"]]], [0],
+ [[ovstest test-jsonrpc request unix:socket get_schema [\"nonexistent\"]]], [0],
[[{"error":null,"id":0,"result":{"details":"get_schema request specifies unknown database nonexistent","error":"unknown database","syntax":"[\"nonexistent\"]"}}
]], [], [test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CHECK([ovsdb-client list-tables unix:socket ordinals], [0], [ignore], [ignore])
# Add an already added database.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], 2, [], [stderr])
-AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
- [I/O error: db2: failed to lock lockfile (...)
+AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], 2, [],
+ [db2: already open
ovs-appctl: ovsdb-server: server returned an error
])
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/' | ovstest 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}}
# Linux
rmem_max=`cat /proc/sys/net/core/rmem_max`
elif rmem_max=`sysctl -n net.inet.tcp.recvbuf_max 2>/dev/null`; then
- : # FreeBSD
+ : # FreeBSD, NetBSD
else
# Don't know how to get maximum socket receive buffer on this OS
AT_SKIP_IF([:])
# Calculate the number of iterations we need to queue. Each of the
# iterations we execute, by itself, yields a monitor update of about
# 25 kB, so fill up that much space plus a few for luck.
-n_iterations=`expr $rmem_max / 2500 + 5`
+n_iterations=`expr $rmem_max / 25000 + 5`
echo rmem_max=$rmem_max n_iterations=$n_iterations
# Calculate the exact number of monitor updates expected for $n_iterations,
AT_CHECK_UNQUOTED([ovs-vsctl get open_vswitch . system_version], [0],
["xyzzy$counter"
])
-
-# Start an ovsdb-client monitoring all changes to the database,
-# without making it block, and then execute the same transactions that
-# we did before.
-AT_CHECK([ovsdb-client --detach --no-chdir --pidfile monitor ALL >ovsdb-client.out 2>ovsdb-client.err])
-for i in `seq 1 $n_iterations`; do
- echo "unblocked update ($i of $n_iterations)"
- trigger_big_update
-
- # Make sure that ovsdb-client gets enough CPU time to process the updates.
- ovs-appctl -t ovsdb-client version > /dev/null
-done
-OVS_WAIT_UNTIL([grep "\"xyzzy$counter\"" ovsdb-client.out])
-AT_CHECK([ovs-appctl -t ovsdb-client exit])
-OVS_WAIT_WHILE([test -e ovsdb-client.pid])
-
-# The ovsdb-client output should have exactly $n_updates updates.
-#
-# Also check that the counter is what we expect.
-logged_updates=`grep -c '^Open_vSwitch' ovsdb-client.out`
-echo "logged_updates=$logged_updates (expected $n_updates)"
-AT_CHECK([test $logged_updates -eq $n_updates])
-AT_CHECK_UNQUOTED([ovs-vsctl get open_vswitch . system_version], [0],
- ["xyzzy$counter"
-])
AT_CLEANUP
\f
AT_BANNER([OVSDB -- ovsdb-server transactions (SSL IPv4 sockets)])