[4/9] testsuite: Add squid to test-container

Message ID 64fec185fc007870ccd9aa120ae5b3bd18b3f015.1774254639.git.jan.kiszka@siemens.com
State Under Review
Headers show
Series Improve testsuite executability, basic GitHub CI | expand

Commit Message

Jan Kiszka March 23, 2026, 8:30 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This is supposed to accelerate certain tests by caching downloads in
RAM.

We need special tuning for docker, see also
https://bugs.launchpad.net/ubuntu-docker-images/+bug/1978272

Start a minimal syslogd to avoid that squid chats to /dev/console.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 testsuite/dockerdata/Dockerfile                | 6 +++---
 testsuite/dockerdata/test-container-entrypoint | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

Patch

diff --git a/testsuite/dockerdata/Dockerfile b/testsuite/dockerdata/Dockerfile
index ef11ba95..d4698aea 100644
--- a/testsuite/dockerdata/Dockerfile
+++ b/testsuite/dockerdata/Dockerfile
@@ -11,10 +11,10 @@  RUN sudo pip3 --proxy=$https_proxy install --break-system-packages \
               avocado-framework==${AVOCADO_VERSION} \
               avocado-framework-plugin-varianter-yaml-to-mux==${AVOCADO_VERSION} && \
     sudo apt-get update && \
-    sudo apt-get install -y -f --no-install-recommends qemu-system ovmf && \
-    sudo apt-get install -y -f --no-install-recommends python3-apt && \
+    sudo apt-get install -y -f --no-install-recommends qemu-system ovmf python3-apt busybox squid && \
     sudo apt-get clean && \
-    sudo rm -rf $(pip3 cache dir) /var/lib/apt/lists/* /tmp/* /var/tmp/*
+    sudo rm -rf $(pip3 cache dir) /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
+    sudo sh -c 'echo "max_filedescriptors 1048576" > /etc/squid/conf.d/docker.conf'
 
 COPY testsuite/dockerdata/test-container-entrypoint /
 
diff --git a/testsuite/dockerdata/test-container-entrypoint b/testsuite/dockerdata/test-container-entrypoint
index 16f74124..e4714942 100755
--- a/testsuite/dockerdata/test-container-entrypoint
+++ b/testsuite/dockerdata/test-container-entrypoint
@@ -61,6 +61,10 @@  esac
 
 mkdir /isar
 
+busybox syslogd
+squid
+export http_proxy=http://localhost:3128
+
 # Reuse the existing entrypoint script, exploiting that entry without
 # parameters drops us into a shell, rather then calling kas.
 echo exit | /container-entrypoint