X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=tests%2Flibrary.at;h=d5dcb1299beca334697227819e2b9d571af4bc59;hb=bdcad671e088d454a807072d07b8314f9860fdbc;hp=d8280fd152a968856d21a5b04ae0e04dc3a35269;hpb=cd5abc65e9750f6c6b91c9fd3fcf2fb87cfdd1fb;p=cascardo%2Fovs.git diff --git a/tests/library.at b/tests/library.at index d8280fd15..d5dcb1299 100644 --- a/tests/library.at +++ b/tests/library.at @@ -2,35 +2,52 @@ AT_BANNER([library unit tests]) AT_SETUP([test flow extractor]) AT_CHECK([$PERL `which flowgen.pl` >/dev/null 3>flows 4>pcap]) -AT_CHECK([test-flows . We do not have a workaround dnl for other platforms, so we skip the test there. -AT_SETUP([test unix socket -- long pathname]) -AT_SKIP_IF([test ! -d /proc/self/fd]) +AT_SETUP([test unix socket, long pathname - C]) +AT_SKIP_IF([test "$IS_WIN32" = "yes"]) dnl Linux has a 108 byte limit; this is 150 bytes long. -mkdir 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 -cd 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 -AT_CHECK([test-unix-socket ../012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/socket socket]) +longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 +mkdir $longname +cd $longname +AT_CHECK([ovstest test-unix-socket ../$longname/socket socket]) +AT_CLEANUP + +AT_SETUP([test unix socket, short pathname - Python]) +AT_SKIP_IF([test $HAVE_PYTHON = no || test "$IS_WIN32" = "yes"]) +AT_CHECK([$PYTHON $srcdir/test-unix-socket.py x]) +AT_CLEANUP + +dnl Unix sockets with long names are problematic because the name has to +dnl go in a fixed-length field in struct sockaddr_un. Generally the limit +dnl is about 100 bytes. On Linux, we work around this by indirecting through +dnl a directory fd using /proc/self/fd/. We do not have a workaround +dnl for other platforms, so we skip the test there. +AT_SETUP([test unix socket, long pathname - Python]) +AT_SKIP_IF([test $HAVE_PYTHON = no || test "$IS_WIN32" = "yes"]) +dnl Linux has a 108 byte limit; this is 150 bytes long. +longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 +mkdir $longname +cd $longname +AT_CHECK([$PYTHON $abs_srcdir/test-unix-socket.py ../$longname/socket socket]) AT_CLEANUP AT_SETUP([ovs_assert]) -OVS_LOGDIR=`pwd`; export OVS_LOGDIR -AT_CHECK([test-util -voff -vfile:info '-vPATTERN:file:%c|%p|%m' --log-file assert || kill -l $?], - [0], [ABRT -], [stderr]) +if test "$IS_WIN32" = "yes"; then + exit_status=9 +else + # SIGABRT + 128 + exit_status=134 +fi +AT_CHECK([ovstest test-util -voff -vfile:info '-vPATTERN:file:%c|%p|%m' --log-file assert], + [$exit_status], [], [stderr]) AT_CHECK([sed 's/\(opened log file\) .*/\1/ s/|[[^|]]*: /|/' test-util.log], [0], [dnl @@ -149,3 +195,20 @@ AT_CHECK([sed 's/.*: // ]) AT_CLEANUP + +AT_SETUP([snprintf]) +AT_CHECK([ovstest test-util snprintf]) +AT_CLEANUP + +AT_SETUP([test bitmap functions]) +AT_CHECK([ovstest test-bitmap check], [0], [.. +]) +AT_CLEANUP + +AT_SETUP([use of public headers]) +AT_CHECK([test-lib], [0], []) +AT_CLEANUP + +AT_SETUP([test ofpbuf module]) +AT_CHECK([ovstest test-ofpbuf], [0], []) +AT_CLEANUP