mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 15:02:40 -04:00
setup_loopback.sh and net_helper.sh are meant to be sourced from other scripts, not executed directly. Therefore, remove the executable bits from those files' permissions. This change is similar to commit49078c1b80("selftests: forwarding: Remove executable bits from lib.sh") Fixes:7d1575014a("selftests/net: GRO coalesce test") Fixes:3bdd9fd29c("selftests/net: synchronize udpgro tests' tx and rx connection") Suggested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com> Link: https://lore.kernel.org/r/20240131140848.360618-4-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
23 lines
389 B
Bash
23 lines
389 B
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Helper functions
|
|
|
|
wait_local_port_listen()
|
|
{
|
|
local listener_ns="${1}"
|
|
local port="${2}"
|
|
local protocol="${3}"
|
|
local port_hex
|
|
local i
|
|
|
|
port_hex="$(printf "%04X" "${port}")"
|
|
for i in $(seq 10); do
|
|
if ip netns exec "${listener_ns}" cat /proc/net/"${protocol}"* | \
|
|
grep -q "${port_hex}"; then
|
|
break
|
|
fi
|
|
sleep 0.1
|
|
done
|
|
}
|