From 153d1fa969df80913393ab6ea29db89c56f26762 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sat, 4 Jun 2022 08:43:35 +0200 Subject: [PATCH] tests/arm64-without-qemu-support: disable binfmt not by uninstalling but by writing to /proc/sys/fs/binfmt_misc/qemu-aarch64 Since 1:7.0+dfsg-3, binfmt.d from systemd is used as preferred alternative to binfmt-support. And systemd does not provide an official way to trigger binfmt (de)registration besides a reboot. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012163 Since we also have binfmt-support installed, systemd and binfmt-support work in parallel so this test becomes flaky and sometimes removing the qemu packages would have the desired effect and sometimes not. To make the test deterministic again, we explicitly disable emulation by writing a 0 to /proc/sys/fs/binfmt_misc/qemu-aarch64 --- tests/arm64-without-qemu-support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/arm64-without-qemu-support b/tests/arm64-without-qemu-support index 2024a43..eb07c5a 100644 --- a/tests/arm64-without-qemu-support +++ b/tests/arm64-without-qemu-support @@ -5,7 +5,7 @@ if [ ! -e /mmdebstrap-testenv ]; then echo "this test modifies the system and should only be run inside a container" >&2 exit 1 fi -apt-get remove --yes qemu-user-static binfmt-support qemu-user +echo 0 > /proc/sys/fs/binfmt_misc/qemu-aarch64 ret=0 {{ CMD }} --mode={{ MODE }} --variant=apt --architectures=arm64 {{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }} || ret=$? if [ "$ret" = 0 ]; then