On Mon, Aug 07, 2023 at 11:28:42PM +0100, Richard W.M. Jones wrote: > Occasionally this test will choose a random seed which results in an > all-zeroes disk. The test tries to convert this to a compressed qcow2 > file, and fails because no compressed clusters are detected in the > resulting file. This happens because qcow2 stores zero clusters with > a special sparse representation, they are never stored compressed, so > a disk with only zeroes in it will never contain compressed clusters. > > To fix this, detect an all-zeroes disk and skip.
Skipping a stochastic test on the cases where a random number set up the corner case is still odd; our testsuite passes, but not always with the same number of tests. I understand benchmarks wanting to use stochastic results, but this particular test seems like one where we aren't buying ourselves any new coverage by using $RANDOM (other than the fact that we found a corner case where nbdkit's sparse-random can produce a 1G empty disk), and where a deterministic test better proves our intent 100% of the time. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs