[LTP] Need info on LTP tests that use /dev/loop mount device.

Petr Vorel pvorel@suse.cz
Wed Nov 23 13:00:54 CET 2022


Hi Suresh,

> Hello,

> I am trying to understand the test cases that use the /dev/loop* device. For example the following tests use the loop device:

> chmod06, chown04, chown04_16, create06, fallocate04, fallocate05 and fsetxattr01

> What is the purpose of using the /dev/loop device? Is it to test some feature of the FS which cannot be done with the currently mounted FS? For example, execute the testcase on a RO filesystem? Are there any others? I am not sure about this, but does LTP also do something like mount the loop device and put different FS, like ext2, ext3, ext4, xfs on the loop device and run the same testcase?

/dev/loop is used for .all_filesystems to run the test on various filesystems
(btrfs, exfat, ext2, ext3, fuse, ntfs, vfat, tmpfs, xfs). But you could pass a
real device via environment variable $LTP_DEV.

https://github.com/linux-test-project/ltp/wiki/C-Test-API#115-testing-with-a-block-device
https://github.com/linux-test-project/ltp/wiki/C-Test-API#113-filesystem-type-detection-and-skiplist

Kind regards,
Petr

> regards,
> Suresh


More information about the ltp mailing list