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 lib/testing/test_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ALL_TESTS=""
VERBOSE_TESTS=${V:-0}
NUM_NS=2

NEEDED_TOOLS="capinfos ethtool ip ping sed tc tcpdump timeout nc tshark nft socat"
NEEDED_TOOLS="capinfos ethtool ip ping sed tc tcpdump timeout tshark nft socat"

if [ -f "$TEST_CONFIG" ]; then
source "$TEST_CONFIG"
Expand Down
4 changes: 2 additions & 2 deletions xdp-filter/tests/test-xdp-filter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ check_port()
local port=$2
local expect=$3
echo "$type port $port $expect"
[[ "$type" == "tcp" ]] && command="nc -w 1 -z $OUTSIDE_IP6 $port"
[[ "$type" == "udp" ]] && command="echo test | nc -w 1 -u $OUTSIDE_IP6 $port"
[[ "$type" == "tcp" ]] && command="echo test | socat - TCP6:[$OUTSIDE_IP6]:$port,connect-timeout=1"
[[ "$type" == "udp" ]] && command="echo test | socat - UDP6:[$OUTSIDE_IP6]:$port"

check_packet "$type dst port $port" "$command" $expect
}
Expand Down
4 changes: 2 additions & 2 deletions xdp-forward/tests/test-xdp-forward.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ EOF
check_run $XDP_FORWARD load -f flowtable ${NS_NAMES[@]}

PID=$(start_background_ns_devnull "socat -4 TCP-LISTEN:10000,reuseaddr,fork -")
check_run ip netns exec ${NS_NAMES[0]} socat ${INPUT_FILE} TCP4:${OUTSIDE_IP4}:12345
check_run ip netns exec ${NS_NAMES[0]} socat ${INPUT_FILE} TCP4:${OUTSIDE_IP4}:12345,connect-timeout=1
stop_background $PID

PID=$(start_background_ns_devnull "socat -6 TCP-LISTEN:10000,reuseaddr,fork -")
check_run ip netns exec ${NS_NAMES[0]} socat ${INPUT_FILE} TCP6:[${OUTSIDE_IP6}]:12345
check_run ip netns exec ${NS_NAMES[0]} socat ${INPUT_FILE} TCP6:[${OUTSIDE_IP6}]:12345,connect-timeout=1
stop_background $PID
}

Expand Down
2 changes: 1 addition & 1 deletion xdp-trafficgen/tests/test-xdp-trafficgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test_tcp()
skip_if_missing_kernel_support
export XDP_SAMPLE_IMMEDIATE_EXIT=1

PID=$(start_background_ns_devnull "nc -6 -l 10000")
PID=$(start_background_ns_devnull "socat -6 TCP-LISTEN:10000,reuseaddr,fork -")
$XDP_TRAFFICGEN tcp -i $NS $INSIDE_IP6 -n 1
res=$?
stop_background $PID
Expand Down