X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fovsdb-idl.at;h=ce220107a87f4ca9e704067ae1b147d75788d581;hb=cd3074b5d59ebbe2f92fbdbd6ace2511aa68917c;hp=68fe8689f98a1cf2e7a74faa302c3a075239ca69;hpb=225b582a8c218eec242921b0eed291cf6ec19b76;p=openvswitch diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at index 68fe8689..ce220107 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at @@ -48,9 +48,29 @@ m4_define([OVSDB_CHECK_IDL_PY], OVSDB_SERVER_SHUTDOWN AT_CLEANUP]) +# same as OVSDB_CHECK_IDL but uses the Python IDL implementation with tcp +m4_define([OVSDB_CHECK_IDL_TCP_PY], + [AT_SETUP([$1 - Python tcp]) + AT_SKIP_IF([test $HAVE_PYTHON = no]) + AT_KEYWORDS([ovsdb server idl positive Python with tcp socket $5]) + AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest.ovsschema], + [0], [stdout], [ignore]) + AT_CHECK([perl $srcdir/choose-port.pl], [0], [stdout]) + TCP_PORT=`cat stdout` + AT_CHECK([ovsdb-server '-vPATTERN:console:ovsdb-server|%c|%m' --detach --no-chdir --pidfile="`pwd`"/pid --remote=ptcp:$TCP_PORT:127.0.0.1 --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore]) + m4_if([$2], [], [], + [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]]), + [0], [$4], [], [kill `cat pid`]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + m4_define([OVSDB_CHECK_IDL], [OVSDB_CHECK_IDL_C($@) - OVSDB_CHECK_IDL_PY($@)]) + OVSDB_CHECK_IDL_PY($@) + OVSDB_CHECK_IDL_TCP_PY($@)]) OVSDB_CHECK_IDL([simple idl, initially empty, no ops], [], @@ -439,3 +459,12 @@ OVSDB_CHECK_IDL_PY([external-linking idl, insert ops], 002: i=2 k=1 ka=[1 2] l2= uuid=<1> 003: done ]]) + +OVSDB_CHECK_IDL_PY([getattr idl, insert ops], + [], + [['getattrtest']], + [[000: empty +001: commit, status=success +002: i=2 k=2 ka=[] l2= uuid=<0> +003: done +]])