--- /dev/null
+From: Simon McVittie <smcv@debian.org>
+Date: Tue, 6 Dec 2022 10:59:33 +0000
+Subject: test-sysroot: Skip on s390x by default
+
+This test regularly fails on the buildds, but I cannot reproduce the
+failure on a porterbox.
+
+Bug: https://github.com/ostreedev/ostree/issues/2527
+Bug-Debian: https://bugs.debian.org/1025532
+Forwarded: not-needed
+---
+ tests/test-sysroot.js | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/tests/test-sysroot.js b/tests/test-sysroot.js
+index d4f67ef..0855b3d 100755
+--- a/tests/test-sysroot.js
++++ b/tests/test-sysroot.js
+@@ -38,6 +38,11 @@ function libtestExec(shellCode) {
+ proc.wait_check(null);
+ }
+
++if (GLib.getenv('DEB_HOST_ARCH') === 's390x' && !GLib.getenv('DEB_ALLOW_FLAKY_TESTS')) {
++ print('1..0 # SKIP https://bugs.debian.org/1025532');
++ imports.system.exit(0);
++}
++
+ print('1..1')
+
+ libtestExec('setup_os_repository archive syslinux');
-debian/Skip-test-pull-repeated-during-CI.patch
configure-use-pkg-config-with-newer-gpgme-and-gpg-error.patch
+debian/Skip-test-pull-repeated-during-CI.patch
+debian/test-sysroot-Skip-on-s390x-by-default.patch
-Tests: flaky
+Tests: flaky-concurrency
+Restrictions: flaky
+Depends: gnome-desktop-testing, ostree-tests
+
+Tests: flaky-sysroot
+Architecture: s390x
Restrictions: flaky
Depends: gnome-desktop-testing, ostree-tests
+++ /dev/null
-#!/bin/sh
-
-set -e
-exec 2>&1
-
-# Ubuntu provides internet access via a proxy, but libostree doesn't need
-# that. However, libostree also doesn't support no_proxy, so it will try
-# to use Ubuntu's proxy for localhost, and fail to reach itself.
-unset ftp_proxy
-unset http_proxy
-unset https_proxy
-unset no_proxy
-
-exec gnome-desktop-testing-runner libostree/test-concurrency.py.test
--- /dev/null
+#!/bin/sh
+
+set -e
+exec 2>&1
+
+# Ubuntu provides internet access via a proxy, but libostree doesn't need
+# that. However, libostree also doesn't support no_proxy, so it will try
+# to use Ubuntu's proxy for localhost, and fail to reach itself.
+unset ftp_proxy
+unset http_proxy
+unset https_proxy
+unset no_proxy
+
+exec gnome-desktop-testing-runner libostree/test-concurrency.py.test
--- /dev/null
+#!/bin/sh
+
+set -e
+exec 2>&1
+
+unset ftp_proxy
+unset http_proxy
+unset https_proxy
+unset no_proxy
+export DEB_ALLOW_FLAKY_TESTS=1
+
+exec gnome-desktop-testing-runner libostree/test-sysroot.js.test
unset https_proxy
unset no_proxy
-tests="$(gnome-desktop-testing-runner -l libostree | while read -r t; do
+namespace=libostree/
+
+tests="$(gnome-desktop-testing-runner -l "$namespace" | while read -r t; do
t="${t%% *}"
case "$t" in
# https://github.com/ostreedev/ostree/issues/1620
continue
;;
+
+ (libostree/test-sysroot.js.test)
+ # https://bugs.debian.org/1025532
+ # https://github.com/ostreedev/ostree/issues/2527
+ if [ "${DEB_HOST_ARCH-}" = s390x ] || [ "$(uname -m)" = s390x ]; then
+ continue
+ fi
+ ;;
esac
echo "$t"
done)"
+if [ -z "$tests" ]; then
+ echo "Error: no installed-tests found matching $namespace" >&2
+ exit 1
+fi
+
# Deliberately word-splitting
# shellcheck disable=SC2046
exec gnome-desktop-testing-runner $tests