[ovs-dev] [PATCH v2 1/3] system-dpdk: Refactor common logs matching.

David Marchand david.marchand at redhat.com
Tue Nov 23 14:15:02 UTC 2021


Move EAL logs and commonly ignored logs to a common macro.
Remove obsolete ones (like i40e [1] and timer [2] logs).
Extend regex on hugepage logs since a check on hugepages availability is
already present on OVS side, and as a consequence, we don't care about
the warnings on availability for certain hugepage size.
Add logs checks for MFEX tests that were missing them.

1: https://git.dpdk.org/dpdk/commit/?id=a075ce2b3e8c
2: https://git.dpdk.org/dpdk/commit/?id=c1077933d45b

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 tests/system-dpdk.at | 53 ++++++++++++++++++++++----------------------
 1 file changed, 27 insertions(+), 26 deletions(-)

diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
index e0e750fde5..2f45613171 100644
--- a/tests/system-dpdk.at
+++ b/tests/system-dpdk.at
@@ -3,6 +3,12 @@ m4_define([CONFIGURE_VETH_OFFLOADS],
 
 AT_BANNER([OVS-DPDK unit tests])
 
+m4_define([SYSTEM_DPDK_ALLOWED_LOGS],[
+\@does not exist. The Open vSwitch kernel module is probably not loaded. at d
+\@EAL:   Invalid NUMA socket, default to 0 at d
+\@EAL: No \(available\|free\) hugepages reported in hugepages- at d
+])
+
 dnl --------------------------------------------------------------------------
 dnl Check if EAL init is successful
 AT_SETUP([OVS-DPDK - EAL init])
@@ -12,10 +18,7 @@ OVS_DPDK_START()
 AT_CHECK([grep "DPDK Enabled - initializing..." ovs-vswitchd.log], [], [stdout])
 AT_CHECK([grep "EAL" ovs-vswitchd.log], [], [stdout])
 AT_CHECK([grep "DPDK Enabled - initialized" ovs-vswitchd.log], [], [stdout])
-OVS_VSWITCHD_STOP(["/Global register is changed during/d
-/EAL:   Invalid NUMA socket, default to 0/d
-/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d
-/EAL: No free hugepages reported in hugepages-1048576kB/d"])
+OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -37,12 +40,7 @@ sleep 2
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 phy0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP("/does not exist. The Open vSwitch kernel module is probably not loaded./d
-/Failed to enable flow control/d
-/Global register is changed during/d
-/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d
-/EAL: No free hugepages reported in hugepages-1048576kB/d
-")
+OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -68,13 +66,10 @@ AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/dpdkvhostclient0: reconnecting..." ovs
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded. at d
+OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
 \@Failed to enable flow control at d
 \@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory at d
-\@Global register is changed during at d
-\@EAL:   Invalid NUMA socket, default to 0 at d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB at d"])
+])")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -144,16 +139,12 @@ pkill -f -x -9 'tail -f /dev/null'
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuser0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded. at d
+OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
 \@Failed to enable flow control at d
 \@VHOST_CONFIG: recvmsg failed at d
 \@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostuser0: No such file or directory at d
-\@Global register is changed during at d
 \@dpdkvhostuser ports are considered deprecated;  please migrate to dpdkvhostuserclient ports. at d
-\@failed to enumerate system datapaths: No such file or directory at d
-\@EAL:   Invalid NUMA socket, default to 0 at d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB at d"])
+])")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -220,16 +211,13 @@ pkill -f -x -9 'tail -f /dev/null'
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded. at d
+OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
 \@Failed to enable flow control at d
 \@VHOST_CONFIG: recvmsg failed at d
 \@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory at d
-\@Global register is changed during at d
 \@dpdkvhostuser ports are considered deprecated;  please migrate to dpdkvhostuserclient ports. at d
 \@failed to enumerate system datapaths: No such file or directory at d
-\@EAL:   Invalid NUMA socket, default to 0 at d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB at d"])
+])")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -256,6 +244,7 @@ OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics | grep -oP 'rx_packe
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
+OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -283,6 +272,7 @@ OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics | grep -oP 'rx_packe
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
+OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -390,5 +380,16 @@ ovs-appctl: ovs-vswitchd: server returned an error
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
+OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
+\@Error: unknown argument 1. at d
+\@Error: invalid study_pkt_cnt value: xyz. at d
+\@Error: unknown argument abcd. at d
+\@Error: -pmd option requires a thread id argument. at d
+\@Error: invalid study_pkt_cnt value: abcd. at d
+\@Error: miniflow extract parser not changed, PMD thread passed is not valid: 'zero'. Pass a valid pmd thread ID. at d
+\@Error: no miniflow extract name provided. Output of miniflow-parser-get shows implementation list. at d
+\@Error: unknown miniflow extract implementation superstudy. at d
+\@Error: invalid study_pkt_cnt value: -pmd. at d
+])")
 AT_CLEANUP dnl
 dnl --------------------------------------------------------------------------
-- 
2.23.0



More information about the dev mailing list