summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-08-02 22:51:24 +0100
committerSam James <sam@gentoo.org>2023-08-02 22:54:13 +0100
commit20f797f1093cf4d531e059d0b6bd6bc962550ed0 (patch)
treebb166472ca608aaac614d00472d1b021d129cf54 /sys-libs
parentsys-apps/systemd: backport nss-resolve fix (diff)
downloadgentoo-20f797f1093cf4d531e059d0b6bd6bc962550ed0.tar.gz
gentoo-20f797f1093cf4d531e059d0b6bd6bc962550ed0.tar.bz2
gentoo-20f797f1093cf4d531e059d0b6bd6bc962550ed0.zip
sys-libs/glibc: skip extra tests in systemd-nspawn containers
Some tests fail because of systemd-nspawn's default restrictive seccomp filter list. Skip those tests only when systemd-detect-virt reckons we're in an nspawn container. Bug: https://sourceware.org/PR30603 Closes: https://github.com/gentoo/gentoo/pull/32148 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/glibc-2.37-r4.ebuild25
-rw-r--r--sys-libs/glibc/glibc-2.38.ebuild25
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild25
3 files changed, 75 insertions, 0 deletions
diff --git a/sys-libs/glibc/glibc-2.37-r4.ebuild b/sys-libs/glibc/glibc-2.37-r4.ebuild
index 830de3656427..5fb0eb873238 100644
--- a/sys-libs/glibc/glibc-2.37-r4.ebuild
+++ b/sys-libs/glibc/glibc-2.37-r4.ebuild
@@ -170,6 +170,25 @@ XFAIL_TEST_LIST=(
tst-strsignal
)
+XFAIL_NSPAWN_TEST_LIST=(
+ # These tests need to be adapted to handle EPERM/ENOSYS(?) properly
+ # upstream, as systemd-nspawn's default seccomp whitelist is too strict.
+ # https://sourceware.org/PR30603
+ test-errno-linux
+ tst-bz21269
+ tst-mlock2
+ tst-ntp_gettime
+ tst-ntp_gettime-time64
+ tst-ntp_gettimex
+ tst-ntp_gettimex-time64
+ tst-pkey
+ tst-process_mrelease
+ tst-adjtime
+ tst-adjtime-time64
+ tst-clock2
+ tst-clock2-time64
+)
+
#
# Small helper functions
#
@@ -1225,6 +1244,12 @@ glibc_src_test() {
local myxfailparams=""
if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
+ local virt=$(systemd-detect-virt 2>/dev/null)
+ if [[ ${virt} == systemd-nspawn ]] ; then
+ ewarn "Skipping extra tests because in systemd-nspawn container"
+ XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" )
+ fi
+
for myt in ${XFAIL_TEST_LIST[@]} ; do
myxfailparams+="test-xfail-${myt}=yes "
done
diff --git a/sys-libs/glibc/glibc-2.38.ebuild b/sys-libs/glibc/glibc-2.38.ebuild
index a0250a2928fc..1e4988e77976 100644
--- a/sys-libs/glibc/glibc-2.38.ebuild
+++ b/sys-libs/glibc/glibc-2.38.ebuild
@@ -170,6 +170,25 @@ XFAIL_TEST_LIST=(
tst-strsignal
)
+XFAIL_NSPAWN_TEST_LIST=(
+ # These tests need to be adapted to handle EPERM/ENOSYS(?) properly
+ # upstream, as systemd-nspawn's default seccomp whitelist is too strict.
+ # https://sourceware.org/PR30603
+ test-errno-linux
+ tst-bz21269
+ tst-mlock2
+ tst-ntp_gettime
+ tst-ntp_gettime-time64
+ tst-ntp_gettimex
+ tst-ntp_gettimex-time64
+ tst-pkey
+ tst-process_mrelease
+ tst-adjtime
+ tst-adjtime-time64
+ tst-clock2
+ tst-clock2-time64
+)
+
#
# Small helper functions
#
@@ -1221,6 +1240,12 @@ glibc_src_test() {
local myxfailparams=""
if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
+ local virt=$(systemd-detect-virt 2>/dev/null)
+ if [[ ${virt} == systemd-nspawn ]] ; then
+ ewarn "Skipping extra tests because in systemd-nspawn container"
+ XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" )
+ fi
+
for myt in ${XFAIL_TEST_LIST[@]} ; do
myxfailparams+="test-xfail-${myt}=yes "
done
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index a0250a2928fc..1e4988e77976 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -170,6 +170,25 @@ XFAIL_TEST_LIST=(
tst-strsignal
)
+XFAIL_NSPAWN_TEST_LIST=(
+ # These tests need to be adapted to handle EPERM/ENOSYS(?) properly
+ # upstream, as systemd-nspawn's default seccomp whitelist is too strict.
+ # https://sourceware.org/PR30603
+ test-errno-linux
+ tst-bz21269
+ tst-mlock2
+ tst-ntp_gettime
+ tst-ntp_gettime-time64
+ tst-ntp_gettimex
+ tst-ntp_gettimex-time64
+ tst-pkey
+ tst-process_mrelease
+ tst-adjtime
+ tst-adjtime-time64
+ tst-clock2
+ tst-clock2-time64
+)
+
#
# Small helper functions
#
@@ -1221,6 +1240,12 @@ glibc_src_test() {
local myxfailparams=""
if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
+ local virt=$(systemd-detect-virt 2>/dev/null)
+ if [[ ${virt} == systemd-nspawn ]] ; then
+ ewarn "Skipping extra tests because in systemd-nspawn container"
+ XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" )
+ fi
+
for myt in ${XFAIL_TEST_LIST[@]} ; do
myxfailparams+="test-xfail-${myt}=yes "
done