]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/361: require sparse file support and fix mounting the volume.
authorAri Sundholm <ari@tuxera.com>
Fri, 10 Sep 2021 11:53:55 +0000 (14:53 +0300)
committerEryu Guan <guaneryu@gmail.com>
Sun, 12 Sep 2021 08:54:19 +0000 (16:54 +0800)
commit285c8e8a2d3007c572398d9c78e2160f6a970e19
tree6b4d232aaa7ee1cfb9bb4a44646059d5f9e03114
parentc6c74bb116bdfdb227cbe19946a4a424a4ae735f
generic/361: require sparse file support and fix mounting the volume.

The test case generic/361 fails on multiple filesystem
implementations due to two issues:

1. A file is created on a 512 MB volume by truncating it to
   1 GB. For this to work, the filesystem implementation must
   support sparse files. However, the test case does not check
   for sparse file support.
2. A loop device, backed by the 1 GB file, is created, mkfs is
   run on it and it is mounted. However, the mount command does
   not specify the filesystem type. This doesn't always work
   properly, as the kernel may pick the wrong driver if there
   are multiple implementations for a particular filesystem,
   or not find a driver at all in some cases.

To fix the behavior of the test case, this commit adds a requirement
for sparse file support to the test case, and explicitly specifies
the filesystem type as $FSTYP when mounting the loop device.

Signed-off-by: Ari Sundholm <ari@tuxera.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/361