Add some simple checks that testpmd was indeed polling two ports, and some packets got through it.
Signed-off-by: David Marchand <[email protected]> --- devtools/test-null.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/devtools/test-null.sh b/devtools/test-null.sh index e3ac168ce3..8f21189262 100755 --- a/devtools/test-null.sh +++ b/devtools/test-null.sh @@ -26,8 +26,14 @@ else libs= fi +logfile=$build/test-null.log (sleep 1 && echo stop) | # testpmd only needs 20M, make it x2 (default number of cores) for NUMA systems $testpmd -l $corelist --no-huge -m 40 \ $libs -a 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \ - --no-mlockall --total-num-mbufs=2048 $testpmd_options -ia + --no-mlockall --total-num-mbufs=2048 $testpmd_options -ia | tee $logfile + +# we expect two ports and some traffic is received and transmitted +grep -q 'io packet forwarding - ports=2 -' $build/test-null.log +grep 'RX-packets: ' $logfile | tail -1 | grep -q 'RX-packets:[[:space:]]*[^0[:space:]]' +grep 'TX-packets: ' $logfile | tail -1 | grep -q 'TX-packets:[[:space:]]*[^0[:space:]]' -- 2.53.0

