test-container: use IPv4 loopback for Squid proxy

Message ID 20261109124139.484495-1-clara.kowalsky@siemens.com
State Under Review
Headers show
Series test-container: use IPv4 loopback for Squid proxy | expand

Commit Message

Clara Kowalsky Nov. 9, 2026, 12:41 p.m. UTC
APT package downloads run against the target rootfs, whose resolver
configuration may not resolve localhost. Running the test:

./scripts/run-tests.sh testsuite/citest.py:SingleTest.test_single_build \
  -p machine=qemuamd64 -p distro=trixie -p rootless=0 -p sstate=0

fails in rootfs_install_pkgs_download with:
Could not resolve 'localhost'

Fix this by pointing the proxy at 127.0.0.1 to avoid resolving its
hostname. The rootfs command shares the test container's network
namespace, so it can still reach Squid.

Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
---
 testsuite/dockerdata/test-container-entrypoint | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/testsuite/dockerdata/test-container-entrypoint b/testsuite/dockerdata/test-container-entrypoint
index 49771c15..8c3b3552 100755
--- a/testsuite/dockerdata/test-container-entrypoint
+++ b/testsuite/dockerdata/test-container-entrypoint
@@ -78,7 +78,7 @@  mkdir /isar
 
 busybox syslogd
 squid
-export http_proxy=http://localhost:3128
+export http_proxy=http://127.0.0.1:3128
 
 # Reuse the existing entrypoint script, exploiting that entry without
 # parameters drops us into a shell, rather then calling kas.