As we have more daemons with OVN that can be tested using ovs autotest framework, it is convenient to extend check_logs() to check the log files of all daemons.
Signed-off-by: Alex Wang <al...@nicira.com> --- PATCH->V2: - make check_logs() check all daemons' log files. --- tests/ofproto-macros.at | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index 74b02b7..a2fc22a 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -115,8 +115,19 @@ m4_define([OVS_VSWITCHD_START], AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 datapath-type=dummy other-config:datapath-id=fedcba9876543210 other-config:hwaddr=aa:55:aa:55:00:00 protocols=[[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14,OpenFlow15]] fail-mode=secure -- $1 m4_if([$2], [], [], [| ${PERL} $srcdir/uuidfilt.pl])], [0], [$2]) ]) +# check_logs scans through log file of each daemon and report all WARN, +# ERR, EMER log entries. User can add custom sed filters in $1. m4_divert_push([PREPARE_TESTS]) check_logs () { + local daemons=$(ls *.pid | sed 's/\.pid//g') + local daemon daemon_logs + + for daemon in ${daemons}; do + if [[ -f "${daemon}.log" ]]; then + daemon_logs="${daemon_logs} ${daemon}.log" + fi + done + sed -n "$1 /timeval.*Unreasonably long [[0-9]]*ms poll interval/d /timeval.*faults: [[0-9]]* minor, [[0-9]]* major/d @@ -125,7 +136,7 @@ check_logs () { /ovs_rcu.*blocked [[0-9]]* ms waiting for .* to quiesce/d /|WARN|/p /|ERR|/p -/|EMER|/p" ovs-vswitchd.log ovsdb-server.log +/|EMER|/p" ${daemon_logs} } m4_divert_pop([PREPARE_TESTS]) -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev