Ben, This works, the core file names can be found from the testsuite.log!
It would be super nice to have the cores reported on the “Test Results” section of the make check output, though: ## ------------- ## ## Test results. ## ## ------------- ## ERROR: All 7 tests were run, 3 failed unexpectedly. If the presence of core files was mentioned here, I would know not to blindly issues a recheck. Or better yet, maybe “recheck” should automatically fail if any of the failed tests produced a core file? Jarno > On Jul 17, 2015, at 4:52 PM, Ben Pfaff <b...@nicira.com> wrote: > > OK, try this then: > > diff --git a/tests/daemon-py.at b/tests/daemon-py.at > index cafa8df..b0f1236 100644 > --- a/tests/daemon-py.at > +++ b/tests/daemon-py.at > @@ -59,7 +59,7 @@ AT_CHECK( > AT_CHECK([kill `cat pid`], [0], [], [ignore], [kill `cat parent`]) > OVS_WAIT_WHILE([kill -0 `cat parent` || kill -0 `cat newpid` || test -e pid], > [kill `cat parent`]) > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([daemon --monitor restart exit code - Python]) > AT_SKIP_IF([test $HAVE_PYTHON = no]) > diff --git a/tests/daemon.at b/tests/daemon.at > index 51d56c5..6dac76a 100644 > --- a/tests/daemon.at > +++ b/tests/daemon.at > @@ -66,7 +66,7 @@ AT_CHECK( > AT_CHECK([kill `cat pid`], [0], [], [ignore], [kill `cat parent`]) > OVS_WAIT_WHILE([kill -0 `cat parent` || kill -0 `cat newpid` || test -e pid], > [kill `cat parent`]) > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([daemon --detach]) > AT_CAPTURE_FILE([pid]) > @@ -89,7 +89,7 @@ else > fi > OVS_WAIT_WHILE([kill -0 `cat saved-pid`]) > AT_CHECK([test ! -e pid]) > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([daemon --detach --monitor]) > AT_SKIP_IF([test "$IS_WIN32" = "yes"]) > @@ -139,7 +139,7 @@ OVS_WAIT_WHILE( > [kill -0 `cat monitor` || kill -0 `cat newdaemon` || test -e daemon], > [kill `cat monitor newdaemon`]) > m4_undefine([CHECK]) > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([daemon --detach startup errors]) > AT_CAPTURE_FILE([pid]) > diff --git a/tests/library.at b/tests/library.at > index 9bd6d81..e5e02c5 100644 > --- a/tests/library.at > +++ b/tests/library.at > @@ -195,7 +195,7 @@ AT_CHECK([sed 's/.*: // > [assertion false failed in test_assert() > ]) > > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([snprintf]) > AT_CHECK([ovstest test-util snprintf]) > diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at > index 8fce70e..b147e06 100644 > --- a/tests/ovsdb-server.at > +++ b/tests/ovsdb-server.at > @@ -284,7 +284,7 @@ AT_CHECK([ovs-appctl -t ovsdb-server > ovsdb-server/list-dbs], > [0], [constraints > ordinals > ]) > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([ovsdb-server/add-db and remove-db with --monitor]) > AT_KEYWORDS([ovsdb server positive]) > @@ -315,7 +315,7 @@ OVS_WAIT_UNTIL( > AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-dbs], > [0], [ordinals > ]) > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([--remote=db: implementation]) > AT_KEYWORDS([ovsdb server positive]) > @@ -465,7 +465,7 @@ OVS_WAIT_WHILE([kill -0 `cat old.pid`]) > OVS_WAIT_UNTIL( > [test -s ovsdb-server.pid && test `cat ovsdb-server.pid` != `cat old.pid`]) > OVS_WAIT_UNTIL([test -S socket1]) > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([ovsdb-server/add-remote and remove-remote with --monitor]) > AT_KEYWORDS([ovsdb server positive]) > @@ -500,7 +500,7 @@ OVS_WAIT_WHILE([kill -0 `cat old.pid`]) > OVS_WAIT_UNTIL( > [test -s ovsdb-server.pid && test `cat ovsdb-server.pid` != `cat old.pid`]) > AT_CHECK([test ! -e socket1]) > -AT_CLEANUP > +AT_CLEANUP_IGNORE_CORES > > AT_SETUP([SSL db: implementation]) > AT_KEYWORDS([ovsdb server positive ssl $5]) > diff --git a/tests/testsuite.at b/tests/testsuite.at > index 92b788b..ec847c7 100644 > --- a/tests/testsuite.at > +++ b/tests/testsuite.at > @@ -14,6 +14,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either > express or implied. > See the License for the specific language governing permissions and > limitations under the License.]) > > +dnl This modifies Autotest so that AT_CLEANUP checks for core dumps > +dnl and fails the test if any of them are present. At the same time, > +dnl some of our tests intentionally kill processes with signals that > +dnl can cause core dumps, so this introduces AT_CLEANUP_IGNORE_CORES > +dnl to ignore core dumps in that case. > +m4_rename([AT_CLEANUP], [AT_CLEANUP_IGNORE_CORES]) > +m4_define([AT_CLEANUP], [dnl > + AT_CHECK([find . -name "core*" -print]) > + AT_CLEANUP_IGNORE_CORES]) > + > m4_include([tests/ovs-macros.at]) > m4_include([tests/ovsdb-macros.at]) > m4_include([tests/ofproto-macros.at]) _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev