#1112101 guestfs-tools: FTBFS on riscv64 (test failure)

#1112101#5
Date:
2025-08-26 11:18:25 UTC
From:
To:
Hi Maintainer

Since the recent binNMU for libxml2, guestfs-tools FTBFS on riscv64
[1], where it built previously.

I think this is the only test failure:

FAIL test-virt-alignment-scan-guests.sh (exit status: 1)

Regards
Graham


[1] https://buildd.debian.org/status/logs.php?pkg=guestfs-tools&arch=riscv64

#1112101#12
Date:
2025-08-31 08:37:19 UTC
From:
To:
control: tag - 1 + patch

Hi,

I initially got difficulties to reproduce the issue locally, but I have
finally been able to reproduce the issue on ricci.d.o, the riscv64
porterbox. It is reproducible most of the time (8/10) in a sid chroot,
but more rarely (1/10) in a trixie chroot. It appeared to be a timing
issue, i.e. things are running a tiny bit slower in sid than in trixie
(presumably due to new version of packages, either QEMU or things
running inside the VM), causing the failure to happen way more often.

Looking at it more in details it appears that the testsuite launches 12
qemu-system processes in parallel, which make things quite slow. It
makes sense when KVM acceleration is available (the test is probably IO
bound), but not with TCG as used on the build daemons (the test is
definitely CPU bound). test-virt-df-guests.sh is also affected by the
same issue.

Therefore I came up with the following patch to limit the number of VMs
to the number of CPUs:
--- guestfs-tools-1.52.3.orig/align/test-virt-alignment-scan-guests.sh +++ guestfs-tools-1.52.3/align/test-virt-alignment-scan-guests.sh @@ -21,7 +21,7 @@ skip_if_skipped libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests-all-good.xml" -$VG virt-alignment-scan -c "$libvirt_uri" +$VG virt-alignment-scan -P$(nproc) -c "$libvirt_uri" r=$? # 0, 2 and 3 are reasonable non-error exit codes. Others are errors. --- guestfs-tools-1.52.3.orig/df/test-virt-df-guests.sh +++ guestfs-tools-1.52.3/df/test-virt-df-guests.sh @@ -25,4 +25,4 @@ skip_if_skipped libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" -$VG virt-df -c "$libvirt_uri" +$VG virt-df -P $(nproc) -c "$libvirt_uri" In addition to fixing the issue, it also makes the tests around 70% faster on a system where the tests were already passing. Regards Aurelien