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
2 changes: 1 addition & 1 deletion test/many_netns_legacy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ for FAMILY in ipv4 ipv6 ; do
echo "Running ${MODE}..."
test_run_cmd_local "ip netns exec $NETNS $IPERF3 -s -p $PORT -1 &"
if [[ $MODE != "baseline" ]]; then
test_run_cmd_local "$BPFTUNE -L&"
test_run_cmd_local "$BPFTUNE -L -s &" true
sleep $SETUPTIME
fds_orig=$($LSOF -p $(pgrep bpftune) 2>/dev/null|wc -l)
else
Expand Down
2 changes: 1 addition & 1 deletion test/many_netns_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ for FAMILY in ipv4 ipv6 ; do
echo "Running ${MODE}..."
test_run_cmd_local "ip netns exec $NETNS $IPERF3 -s -p $PORT -1 &"
if [[ $MODE != "baseline" ]]; then
test_run_cmd_local "$BPFTUNE &"
test_run_cmd_local "$BPFTUNE -s &" true
sleep $SETUPTIME
fds_orig=$($LSOF -p $(pgrep bpftune) 2>/dev/null|wc -l)
else
Expand Down
2 changes: 1 addition & 1 deletion test/rmem_legacy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ for FAMILY in ipv4 ipv6 ; do
echo "Running ${MODE}..."
test_run_cmd_local "ip netns exec $NETNS $IPERF3 -s -p $PORT -1 &"
if [[ $MODE != "baseline" ]]; then
test_run_cmd_local "$BPFTUNE -L &"
test_run_cmd_local "$BPFTUNE -Ls &" true
sleep $SETUPTIME
else
LOGSZ=$(wc -l $LOGFILE | awk '{print $1}')
Expand Down
2 changes: 1 addition & 1 deletion test/rmem_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ for FAMILY in ipv4 ipv6 ; do
echo "Running ${MODE}..."
test_run_cmd_local "ip netns exec $NETNS $IPERF3 -s -p $PORT -1 &"
if [[ $MODE != "baseline" ]]; then
test_run_cmd_local "$BPFTUNE &"
test_run_cmd_local "$BPFTUNE -s &" true
sleep $SETUPTIME
else
LOGSZ=$(wc -l $LOGFILE | awk '{print $1}')
Expand Down
9 changes: 7 additions & 2 deletions test/test_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ test_run_cmd_local()
fi

if [[ "$DO_REDIRECT" == "true" ]]; then
rm -f $TESTLOG_LAST
touch $CMDLOG
if [[ -f $TESTLOG_LAST ]]; then
rm -f $TESTLOG_LAST
fi
ln -s $CMDLOG $TESTLOG_LAST
if [[ $VERBOSE -gt 0 ]]; then
echo "For output see ${CMDLOG}"
Expand Down Expand Up @@ -194,6 +196,7 @@ test_run_cmd_local()
test_setup_local()
{
CMD=$1
CMDLOG="${TESTDIR}/testlog.$$"
TIMEOUT=$2

BPFTUNE_SUPPORT="$(${BPFTUNE} -S 2>&1)"
Expand Down Expand Up @@ -260,6 +263,8 @@ test_setup_local()
$AUDIT_CMD -e 0 >/dev/null 2>&1
fi
sysctl -qw net.ipv4.tcp_fin_timeout=5
# Clear log for next test
echo "" > $CMDLOG
test_run_cmd_local "$CMD" true
}

Expand Down Expand Up @@ -289,7 +294,7 @@ test_cleanup_local()
fi
if [[ $EXIT -ne 0 ]]; then
if [[ -f $TESTLOG_LAST ]]; then
echo "Output of last command:"
echo "Output of commands:"
cat $TESTLOG_LAST
fi
else
Expand Down
2 changes: 1 addition & 1 deletion test/wmem_legacy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ for FAMILY in ipv4 ipv6 ; do
echo "Running ${MODE}..."
test_run_cmd_local "ip netns exec $NETNS $IPERF3 -s -p $PORT -1 &"
if [[ $MODE != "baseline" ]]; then
test_run_cmd_local "$BPFTUNE -L &"
test_run_cmd_local "$BPFTUNE -Ls &" true
sleep $SETUPTIME
else
LOGSZ=$(wc -l $LOGFILE | awk '{print $1}')
Expand Down
2 changes: 1 addition & 1 deletion test/wmem_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ for FAMILY in ipv4 ipv6 ; do
echo "Running ${MODE}..."
test_run_cmd_local "ip netns exec $NETNS $IPERF3 -s -p $PORT -1 &"
if [[ $MODE != "baseline" ]]; then
test_run_cmd_local "$BPFTUNE &"
test_run_cmd_local "$BPFTUNE -s &" true
sleep $SETUPTIME
else
LOGSZ=$(wc -l $LOGFILE | awk '{print $1}')
Expand Down