From e09102be0cd47c5149ba3fa21032d63a42ab2b2b Mon Sep 17 00:00:00 2001 From: Tuomas Vaarala Date: Fri, 24 Apr 2026 10:24:50 +0300 Subject: [PATCH] Coin: QNX QEMU: add localhost to /etc/hosts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Coin hosts file fully overrides the SDP default, which had 127.0.0.1 and ::1 entries. Combined with nsswitch "hosts: files mdnsd dns" and resolv.conf -> 172.31.1.1, any test resolving http(s)://localhost fell through to NXDOMAIN. Fixes tst_QHttpServer (229 HostNotFoundError asserts) and tst_abstractoauth2 (silent crash) on QNX 8.0 QEMU. Applied to 710/ too so the same latent issue can't surface there. Pick-to: 6.8 Change-Id: I2aaa782980cb44afe3499ba8bd35fd7d3c093043 Reviewed-by: Simo Fält Reviewed-by: Marianne Yrjänä (cherry picked from commit 00177db9890acc55e27e932dc5641607a72cad38) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit ae3c6765946a52d6f0575a090eef53fcd5f8be34) --- .../qnx_qemu_build_files/710/local/misc_files/etc/hosts | 6 ++++++ .../qnx_qemu_build_files/800/local/misc_files/etc/hosts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/coin/provisioning/common/linux/qnx_qemu_build_files/710/local/misc_files/etc/hosts b/coin/provisioning/common/linux/qnx_qemu_build_files/710/local/misc_files/etc/hosts index 58b8d5a1..bb92b3cc 100644 --- a/coin/provisioning/common/linux/qnx_qemu_build_files/710/local/misc_files/etc/hosts +++ b/coin/provisioning/common/linux/qnx_qemu_build_files/710/local/misc_files/etc/hosts @@ -1,3 +1,9 @@ +# Loopback — the QNX SDP's default /etc/hosts ships these, but this +# file overrides that default. Tests that connect to http(s)://localhost +# (e.g. tst_qhttpserver, tst_abstractoauth2) need them present. +127.0.0.1 localhost +::1 localhost + # Need to add all testserver names statically # as current Docker uses Multicast DNS (mDNS) (avahi) # Which does not work with QNX qemu diff --git a/coin/provisioning/common/linux/qnx_qemu_build_files/800/local/misc_files/etc/hosts b/coin/provisioning/common/linux/qnx_qemu_build_files/800/local/misc_files/etc/hosts index 58b8d5a1..bb92b3cc 100644 --- a/coin/provisioning/common/linux/qnx_qemu_build_files/800/local/misc_files/etc/hosts +++ b/coin/provisioning/common/linux/qnx_qemu_build_files/800/local/misc_files/etc/hosts @@ -1,3 +1,9 @@ +# Loopback — the QNX SDP's default /etc/hosts ships these, but this +# file overrides that default. Tests that connect to http(s)://localhost +# (e.g. tst_qhttpserver, tst_abstractoauth2) need them present. +127.0.0.1 localhost +::1 localhost + # Need to add all testserver names statically # as current Docker uses Multicast DNS (mDNS) (avahi) # Which does not work with QNX qemu