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>
This commit is contained in:
Matus Fabian 2024-12-08 15:13:44 +01:00 committed by Florin Coras
parent 8b2a67c8f3
commit c4b4cd5e77
13 changed files with 44 additions and 23 deletions

View File

@ -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" \

View File

@ -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"]

View File

@ -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/*

View File

@ -1,4 +1,4 @@
ARG UBUNTU_VERSION
ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}

View File

@ -1,4 +1,4 @@
ARG UBUNTU_VERSION
ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}

View File

@ -1,4 +1,4 @@
ARG UBUNTU_VERSION
ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}

View File

@ -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/

View File

@ -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"]

View File

@ -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())

View File

@ -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")

View File

@ -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

View File

@ -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)

View File

@ -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