]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic: enable swapfile tests on Btrfs
authorOmar Sandoval <osandov@fb.com>
Tue, 22 May 2018 23:33:57 +0000 (16:33 -0700)
committerEryu Guan <guaneryu@gmail.com>
Wed, 23 May 2018 02:53:04 +0000 (10:53 +0800)
commitbd6d67ee598e7818d62ce7a05b771906c8cc9eb9
tree8ef46d2d6b3f2bc4d41a7c6419680390a79ec673
parent39aca573e4b9a76ebe1fe0f0e237b2f0ee31b856
generic: enable swapfile tests on Btrfs

Commit 8c96cfbfe530 ("generic/35[67]: disable swapfile tests on
Btrfs") disabled the swapfile tests on Btrfs because it did not
support swapfiles at the time. Now that we're adding support, we
want these tests to run, but they don't. _require_scratch_swapfile
always fails for Btrfs because swapfiles on Btrfs must be set to
nocow. After fixing that, generic/356 and generic/357 fail for the
same reason. After fixing _that_, both tests still fail because we
don't allow reflinking a non-checksummed extent (which nocow
implies) to a checksummed extent.

Add a helper for formatting a swap file which does the chattr, and
chattr the second file, which gets these tests running on kernels
supporting Btrfs swapfiles.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
tests/generic/356
tests/generic/357