mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
tests/discard: sync before close isn't necessary.
However we should be calling shutdown, since we're writing to the disk and need to catch qemu errors.
This commit is contained in:
@@ -106,7 +106,7 @@ die "$0: surprising result: full size <= original size\n"
|
||||
# Remove the file and check the filesystem is trimmed automatically.
|
||||
|
||||
$g->rm ("/data");
|
||||
$g->sync ();
|
||||
$g->shutdown ();
|
||||
$g->close ();
|
||||
|
||||
my $trimmed_size = (stat ($disk))[12];
|
||||
|
||||
@@ -114,7 +114,7 @@ die "$0: surprising result: full size <= original size\n"
|
||||
|
||||
$g->rm ("/data");
|
||||
$g->fstrim ("/");
|
||||
$g->sync ();
|
||||
$g->shutdown ();
|
||||
$g->close ();
|
||||
|
||||
my $trimmed_size = (stat ($disk))[12];
|
||||
|
||||
Reference in New Issue
Block a user