Skip to content

Commit

Permalink
test: sched_pktio: include packet_gen output in failure log
Browse files Browse the repository at this point in the history
Provide more debug info by including packet_gen output in test script
failure log.

Signed-off-by: Matias Elo <[email protected]>
Reviewed-by: Tuomas Taipale <[email protected]>
  • Loading branch information
MatiasElo committed May 17, 2024
1 parent a245a22 commit 2e3d657
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/performance/odp_sched_pktio_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2018 Linaro Limited
# Copyright (c) 2024 Nokia
#

# directory where test binaries have been built
Expand Down Expand Up @@ -58,10 +59,11 @@ run_sched_pktio()
sleep 1

# Run odp_packet_gen with one tx thread
GEN_LOG=odp_packet_gen_tmp.log
(odp_packet_gen${EXEEXT} --gap 0 -i $IF0 \
--ipv4_src 192.168.0.1 --ipv4_dst 192.168.0.2 \
-r 0 -t 1 2>&1 > /dev/null) \
2>&1 > /dev/null &
-r 0 -t 1 2>&1 > $GEN_LOG) \
2>&1 > $GEN_LOG &

GEN_PID=$!

Expand All @@ -78,13 +80,18 @@ run_sched_pktio()
ret=$?

if [ $ret -eq 3 ]; then
echo "PASS: received and transmitted over 5000 packets"
echo "PASS: received and transmitted over threshold number of packets"
ret=0
else
echo "FAIL: less than thousand rx or tx packets $ret"
echo -e "\nodp_packet_gen"
echo "=============="
cat $GEN_LOG
echo "FAIL: less than threshold number of rx or tx packets: ret=$ret"
ret=1
fi

rm -f $GEN_LOG

cleanup_pktio_env

exit $ret
Expand Down

0 comments on commit 2e3d657

Please sign in to comment.