aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-12-08 15:13:44 +0100
committerFlorin Coras <florin.coras@gmail.com>2024-12-10 05:06:06 +0000
commitc4b4cd5e77cc5f3305c90eecf802c601392b7975 (patch)
treed07443483328c76b5b3fcaf0e1e04cf838cbb8fb /extras
parent8b2a67c8f3977291fbafca37a435b5cd1ef4c214 (diff)
hs-test: arm support
CPU arch dependencies cleanup. Everything works fine apart from redis-benchmark test. Type: test Change-Id: I4a1e7d3bce994f6ea0681e06955ef9c621468642 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/hs-test/Makefile2
-rw-r--r--extras/hs-test/docker/Dockerfile.ab9
-rw-r--r--extras/hs-test/docker/Dockerfile.curl4
-rw-r--r--extras/hs-test/docker/Dockerfile.nginx2
-rw-r--r--extras/hs-test/docker/Dockerfile.nginx-http32
-rw-r--r--extras/hs-test/docker/Dockerfile.nginx-server2
-rw-r--r--extras/hs-test/docker/Dockerfile.vpp7
-rw-r--r--extras/hs-test/docker/Dockerfile.wrk9
-rw-r--r--extras/hs-test/infra/hst_suite.go6
-rw-r--r--extras/hs-test/ldp_test.go1
-rwxr-xr-xextras/hs-test/script/build_curl.sh4
-rwxr-xr-xextras/hs-test/script/build_hst.sh15
-rw-r--r--extras/hs-test/topo-containers/single.yaml4
13 files changed, 44 insertions, 23 deletions
diff --git a/extras/hs-test/Makefile b/extras/hs-test/Makefile
index 7d1242e08d8..54ab9221be6 100644
--- a/extras/hs-test/Makefile
+++ b/extras/hs-test/Makefile
@@ -175,7 +175,7 @@ install-deps:
@rm -f .deps.ok
@apt-get update \
&& apt-get install -y apt-transport-https ca-certificates curl software-properties-common \
- apache2-utils wrk bridge-utils gpg
+ bridge-utils gpg
@if [ ! -f /usr/share/keyrings/docker-archive-keyring.gpg ] ; then \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg; \
echo "deb [arch=$(ARCH) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(UBUNTU_CODENAME) stable" \
diff --git a/extras/hs-test/docker/Dockerfile.ab b/extras/hs-test/docker/Dockerfile.ab
new file mode 100644
index 00000000000..3ed1528c8a4
--- /dev/null
+++ b/extras/hs-test/docker/Dockerfile.ab
@@ -0,0 +1,9 @@
+ARG UBUNTU_VERSION=22.04
+
+FROM ubuntu:${UBUNTU_VERSION}
+
+RUN apt-get update \
+ && apt-get install -y apache2-utils \
+ && rm -rf /var/lib/apt/lists/*
+
+ENTRYPOINT ["ab"]
diff --git a/extras/hs-test/docker/Dockerfile.curl b/extras/hs-test/docker/Dockerfile.curl
index 0722068b2f7..8e9b579aad4 100644
--- a/extras/hs-test/docker/Dockerfile.curl
+++ b/extras/hs-test/docker/Dockerfile.curl
@@ -1,7 +1,9 @@
-ARG UBUNTU_VERSION
+ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}
+ARG TARGETARCH
+
RUN apt-get update \
&& apt-get install -y xz-utils wget \
&& rm -rf /var/lib/apt/lists/*
diff --git a/extras/hs-test/docker/Dockerfile.nginx b/extras/hs-test/docker/Dockerfile.nginx
index 78a75d44a31..c2a3e98df28 100644
--- a/extras/hs-test/docker/Dockerfile.nginx
+++ b/extras/hs-test/docker/Dockerfile.nginx
@@ -1,4 +1,4 @@
-ARG UBUNTU_VERSION
+ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}
diff --git a/extras/hs-test/docker/Dockerfile.nginx-http3 b/extras/hs-test/docker/Dockerfile.nginx-http3
index fc905376986..d52aff8f2f8 100644
--- a/extras/hs-test/docker/Dockerfile.nginx-http3
+++ b/extras/hs-test/docker/Dockerfile.nginx-http3
@@ -1,4 +1,4 @@
-ARG UBUNTU_VERSION
+ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}
diff --git a/extras/hs-test/docker/Dockerfile.nginx-server b/extras/hs-test/docker/Dockerfile.nginx-server
index ecb8f590f89..b245b41e1be 100644
--- a/extras/hs-test/docker/Dockerfile.nginx-server
+++ b/extras/hs-test/docker/Dockerfile.nginx-server
@@ -1,4 +1,4 @@
-ARG UBUNTU_VERSION
+ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}
diff --git a/extras/hs-test/docker/Dockerfile.vpp b/extras/hs-test/docker/Dockerfile.vpp
index 5f5d41ce610..69fe561b759 100644
--- a/extras/hs-test/docker/Dockerfile.vpp
+++ b/extras/hs-test/docker/Dockerfile.vpp
@@ -1,4 +1,4 @@
-ARG UBUNTU_VERSION
+ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}
@@ -8,6 +8,9 @@ RUN apt-get update \
vim gdb libunwind-dev redis redis-tools iperf3 \
&& rm -rf /var/lib/apt/lists/*
+ARG OS_ARCH
+RUN echo "I'm building for $OS_ARCH"
+
ENV DIR=vpp-data/lib/vpp_plugins
COPY \
$DIR/af_packet_plugin.so \
@@ -22,7 +25,7 @@ COPY \
$DIR/prom_plugin.so \
$DIR/tlsopenssl_plugin.so \
$DIR/mactime_plugin.so \
- /usr/lib/x86_64-linux-gnu/vpp_plugins/
+ /usr/lib/$OS_ARCH-linux-gnu/vpp_plugins/
COPY vpp-data/bin/vpp /usr/bin/
COPY vpp-data/bin/vppctl /usr/bin/
diff --git a/extras/hs-test/docker/Dockerfile.wrk b/extras/hs-test/docker/Dockerfile.wrk
new file mode 100644
index 00000000000..b4108732556
--- /dev/null
+++ b/extras/hs-test/docker/Dockerfile.wrk
@@ -0,0 +1,9 @@
+ARG UBUNTU_VERSION=22.04
+
+FROM ubuntu:${UBUNTU_VERSION}
+
+RUN apt-get update \
+ && apt-get install -y wrk \
+ && rm -rf /var/lib/apt/lists/*
+
+ENTRYPOINT ["wrk"]
diff --git a/extras/hs-test/infra/hst_suite.go b/extras/hs-test/infra/hst_suite.go
index 9a3a3c9c8f6..0cedfc692b0 100644
--- a/extras/hs-test/infra/hst_suite.go
+++ b/extras/hs-test/infra/hst_suite.go
@@ -439,6 +439,12 @@ func (s *HstSuite) SkipUnlessLeakCheck() {
}
}
+func (s *HstSuite) SkipIfArm() {
+ if runtime.GOARCH == "arm64" {
+ s.Skip("test case not supported on arm")
+ }
+}
+
func (s *HstSuite) WaitForCoreDump() bool {
var filename string
dir, err := os.Open(s.getLogDirPath())
diff --git a/extras/hs-test/ldp_test.go b/extras/hs-test/ldp_test.go
index 76bc3669fb6..585f4981681 100644
--- a/extras/hs-test/ldp_test.go
+++ b/extras/hs-test/ldp_test.go
@@ -78,6 +78,7 @@ func ldPreloadIperfVpp(s *LdpSuite, useUdp bool) {
func RedisBenchmarkTest(s *LdpSuite) {
s.SkipIfMultiWorker()
+ s.SkipIfArm()
serverContainer := s.GetContainerByName("server-vpp")
clientContainer := s.GetContainerByName("client-vpp")
diff --git a/extras/hs-test/script/build_curl.sh b/extras/hs-test/script/build_curl.sh
index e4258946f9e..1a61b9fd70a 100755
--- a/extras/hs-test/script/build_curl.sh
+++ b/extras/hs-test/script/build_curl.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-wget https://github.com/stunnel/static-curl/releases/download/8.5.0/curl-static-amd64-8.5.0.tar.xz
-tar -xvf ./curl-static-amd64-8.5.0.tar.xz
+wget https://github.com/stunnel/static-curl/releases/download/8.5.0/curl-static-"$TARGETARCH"-8.5.0.tar.xz
+tar -xvf ./curl-static-"$TARGETARCH"-8.5.0.tar.xz
cp curl /usr/bin/curl \ No newline at end of file
diff --git a/extras/hs-test/script/build_hst.sh b/extras/hs-test/script/build_hst.sh
index a072abdb29d..b7580f5af7e 100755
--- a/extras/hs-test/script/build_hst.sh
+++ b/extras/hs-test/script/build_hst.sh
@@ -5,18 +5,6 @@ if [ "$(lsb_release -is)" != Ubuntu ]; then
exit 1
fi
-if [ -z "$(which ab)" ]; then
- echo "Host stack test framework requires apache2-utils to be installed"
- echo "It is recommended to run 'sudo make install-dep'"
- exit 1
-fi
-
-if [ -z "$(which wrk)" ]; then
- echo "Host stack test framework requires wrk to be installed"
- echo "It is recommended to run 'sudo make install-dep'"
- exit 1
-fi
-
export VPP_WS=../..
OS_ARCH="$(uname -m)"
DOCKER_BUILD_DIR="/scratch/docker-build"
@@ -73,6 +61,7 @@ docker_build () {
# shellcheck disable=2086
docker buildx build ${DOCKER_CACHE_ARGS} \
--build-arg UBUNTU_VERSION \
+ --build-arg OS_ARCH="$OS_ARCH" \
--build-arg http_proxy="$HTTP_PROXY" \
--build-arg https_proxy="$HTTP_PROXY" \
--build-arg HTTP_PROXY="$HTTP_PROXY" \
@@ -87,6 +76,8 @@ docker_build hs-test/nginx-server nginx-server
docker_build hs-test/curl curl
docker_build hs-test/envoy envoy
docker_build hs-test/nginx-http3 nginx-http3
+docker_build hs-test/ab ab
+docker_build hs-test/wrk wrk
# cleanup detached images
images=$(docker images --filter "dangling=true" -q --no-trunc)
diff --git a/extras/hs-test/topo-containers/single.yaml b/extras/hs-test/topo-containers/single.yaml
index b6970c517bd..b4449dc1918 100644
--- a/extras/hs-test/topo-containers/single.yaml
+++ b/extras/hs-test/topo-containers/single.yaml
@@ -29,12 +29,12 @@ containers:
is-optional: true
- name: "ab"
- image: "jordi/ab"
+ image: "hs-test/ab"
is-optional: true
run-detached: false
- name: "wrk"
- image: "skandyla/wrk"
+ image: "hs-test/wrk"
is-optional: true
run-detached: false