diff options
Diffstat (limited to 'src/tests')
-rwxr-xr-x | src/tests/netns.sh | 2 | ||||
-rw-r--r-- | src/tests/qemu/Makefile | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/netns.sh b/src/tests/netns.sh index f17a3ef..6d20c1b 100755 --- a/src/tests/netns.sh +++ b/src/tests/netns.sh @@ -39,7 +39,7 @@ ip2() { pretty 2 "ip $*"; ip -n $netns2 "$@"; } sleep() { read -t "$1" -N 0 || true; } waitiperf() { pretty "${1//*-}" "wait for iperf:5201"; while [[ $(ss -N "$1" -tlp 'sport = 5201') != *iperf3* ]]; do sleep 0.1; done; } waitncatudp() { pretty "${1//*-}" "wait for udp:1111"; while [[ $(ss -N "$1" -ulp 'sport = 1111') != *ncat* ]]; do sleep 0.1; done; } -waitiface() { pretty "${1//*-}" "wait for $2 to come up"; ip netns exec "$1" bash -c "while [[ \$(< \"/sys/class/net/$2/operstate\") != up ]]; do read -t .1 -N 0; done;"; } +waitiface() { pretty "${1//*-}" "wait for $2 to come up"; ip netns exec "$1" bash -c "while [[ \$(< \"/sys/class/net/$2/operstate\") != up ]]; do read -t .1 -N 0 || true; done;"; } cleanup() { set +e diff --git a/src/tests/qemu/Makefile b/src/tests/qemu/Makefile index 140def6..aad4557 100644 --- a/src/tests/qemu/Makefile +++ b/src/tests/qemu/Makefile @@ -35,9 +35,9 @@ $(DISTFILES_PATH)/$(1): endef ifeq ($(findstring -rc,$(KERNEL_VERSION)),) -KERNEL_URL_DIRECTORY := https://cdn.kernel.org/pub/linux/kernel/v4.x/ +KERNEL_URL_DIRECTORY := https://cdn.kernel.org/pub/linux/kernel/v$(firstword $(subst ., ,$(KERNEL_VERSION))).x/ else -KERNEL_URL_DIRECTORY := https://cdn.kernel.org/pub/linux/kernel/v4.x/testing/ +KERNEL_URL_DIRECTORY := https://cdn.kernel.org/pub/linux/kernel/v$(firstword $(subst ., ,$(KERNEL_VERSION))).x/testing/ endif $(eval $(call tar_download,KERNEL,linux,$(KERNEL_VERSION),.tar.xz,$(KERNEL_URL_DIRECTORY))) |