Hi Aurelien,
On Sun, 31 Aug 2025 10:37:19 +0200 Aurelien Jarno <[email protected]> wrote:
control: tag - 1 + patch
Hi,
On 2025-08-26 11:18, Graham Inggs wrote:
> Source: guestfs-tools
> Version: 1.52.3-1
> Severity: serious
> Tags: ftbfs
> X-Debbugs-Cc: [email protected]
>
> 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)
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.
I wonder if instead of nproc, we shouldn't use DEB_BUILD_OPTION_PARALLEL threads
instead. But it works here, so I'll upload it to unblock the libxml2.9 removal.
Cheers,
Emilio