[Libguestfs] Tests and trimming vfat

Richard W.M. Jones rjones at redhat.com
Wed Sep 5 15:37:05 UTC 2018


Here's a fun one:

+ guestfish -N test-virt-sparsify-in-place-fstrim-unsupported.img=fs:vfat exit
+ virt-sparsify --in-place test-virt-sparsify-in-place-fstrim-unsupported.img
+ tee test-virt-sparsify-in-place-fstrim-unsupported.log
[   2.4] Trimming /dev/sda1
[   7.5] Sparsify in-place operation completed with no errors
+ grep 'warning:.*fstrim' test-virt-sparsify-in-place-fstrim-unsupported.log
FAIL test-virt-sparsify-in-place-fstrim-unsupported.sh (exit status: 1)

We expect (for the purposes of the regression test) that vfat
filesystems cannot be trimmed.  It turns out that fstrim for vfat has
now been implemented in Linux (commit f663b5b38fff) :-)  Thanks
Wentao Wang (this is actually great for virt-v2v).

So we need to find another filesystem which doesn't support fstrim.
Or maybe just delete this regression test.

Thoughts?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list