X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Flibrary.at;h=55adcfbf2d08a04e2af8004df9a5662fcf477d5d;hb=eb857b4824d2a62e1cc1b85c30a3da007d4942c9;hp=0e408f04f64b06ec9c7e364659786096ccfba748;hpb=c69ee87c10818267f991236201150b1fa51ae519;p=sliver-openvswitch.git diff --git a/tests/library.at b/tests/library.at index 0e408f04f..55adcfbf2 100644 --- a/tests/library.at +++ b/tests/library.at @@ -7,34 +7,155 @@ 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_CHECK([dnl + case `uname` in dnl ( + *[[lL]]inux*) + exit 0 + ;; dnl ( + *) + dnl Magic exit code to tell Autotest to skip this test. + exit 77 + ;; + esac +]) +dnl Linux has a 108 byte limit; this is 150 bytes long. +mkdir 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 +cd 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 +AT_CHECK([test-unix-socket ../012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/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]) + +AT_CHECK([sed 's/\(opened log file\) .*/\1/ +s/|[[^|]]*: /|/' test-util.log], [0], [dnl +vlog|INFO|opened log file +util|EMER|assertion false failed in test_assert() +]) + +AT_CHECK([sed 's/.*: // +1q' stderr], [0], + [assertion false failed in test_assert() +]) + AT_CLEANUP