Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
make cong tests more robust to iperf3 failures
...which can happen with loss rate
  • Loading branch information
alan-maguire committed Sep 1, 2023
commit 0077020285c1243f358023e75b1e8210d14e7b9f
7 changes: 4 additions & 3 deletions test/cong_legacy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TIMEOUT=30

for FAMILY in ipv4 ipv6 ; do

for DROP_PERCENT in 2 0 ; do
for DROP_PERCENT in 0 5 ; do

for CLIENT_OPTS in "" "-R" ; do
case $FAMILY in
Expand Down Expand Up @@ -69,9 +69,9 @@ for DROP_PERCENT in 2 0 ; do
fi
set +e
test_run_cmd_local "$IPERF3 -fm $CLIENT_OPTS -p $PORT -c $ADDR" true
IPERF_STATUS=$?
set -e
if [[ $MODE != "baseline" ]]; then
#ip netns exec $NETNS pkill -TERM iperf3
pkill -TERM bpftune
sleep $SETUPTIME
fi
Expand All @@ -90,6 +90,7 @@ for DROP_PERCENT in 2 0 ; do
sleep $SLEEPTIME
done

if [[ $IPERF_STATUS == 0 ]]; then
printf "Results sender (${units}): "
for (( i=0; i < ${#sbaseline_results[@]}; i++ ))
do
Expand All @@ -112,7 +113,7 @@ for DROP_PERCENT in 2 0 ; do
echo "baseline (${rbase}) < test (${rtest})"
fi
done

fi
sleep $SETUPTIME
grep "Summary: tcp_conn_tuner" $LOGFILE

Expand Down
8 changes: 5 additions & 3 deletions test/cong_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TIMEOUT=30

for FAMILY in ipv4 ipv6 ; do

for DROP_PERCENT in 0 10 ; do
for DROP_PERCENT in 0 5 ; do

for CLIENT_OPTS in "" "-R" ; do
case $FAMILY in
Expand Down Expand Up @@ -59,7 +59,7 @@ for DROP_PERCENT in 0 10 ; do
test_run_cmd_local "$BPFTUNE -ds &" true
sleep $SETUPTIME
# warm up connection...
for i in {1..40}; do
for i in {1..20}; do
set +e
$IPERF3 -fm $CLIENT_OPTS -p $PORT -t 1 -c $ADDR > /dev/null 2>&1
set -e
Expand All @@ -69,6 +69,7 @@ for DROP_PERCENT in 0 10 ; do
fi
set +e
test_run_cmd_local "$IPERF3 -fm $CLIENT_OPTS -p $PORT -c $ADDR" true
IPERF_STATUS=$?
set -e
if [[ $MODE != "baseline" ]]; then
pkill -TERM bpftune
Expand All @@ -89,6 +90,7 @@ for DROP_PERCENT in 0 10 ; do
sleep $SLEEPTIME
done

if [[ $IPERF_STATUS == 0 ]]; then
printf "Results sender (${units}): "
for (( i=0; i < ${#sbaseline_results[@]}; i++ ))
do
Expand All @@ -111,7 +113,7 @@ for DROP_PERCENT in 0 10 ; do
echo "baseline (${rbase}) < test (${rtest})"
fi
done

fi
sleep $SETUPTIME
grep "Summary: tcp_conn_tuner" $LOGFILE

Expand Down