linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.31k stars 1.01k forks source link

Not able to find option to run ltp test for a specific filesystem #1101

Closed shivania2 closed 10 months ago

shivania2 commented 10 months ago

I have mounted a filesystem on /mnt directory and wanted to run ltp test on the /mnt directory. I have explored the options provided in help and code also but didnot find any way to run ltp test on specific directory.

Is it possible to run ltp test for a filesystem mounted on /mnt directory?

pevik commented 10 months ago
export TMPDIR="/mnt"

Documented in our wiki: https://github.com/linux-test-project/ltp/wiki/User-Guidelines#1-library-environment-variables

pevik commented 10 months ago

NOTE: many tests use .all_filesystems = 1 or TST_ALL_FILESYSTEMS=1, these test on loop device formatted with these filesystems: ext2, ext3, ext4, xfs, btrfs, vfat, exfat, ntfs, tmpfs (the current list).

shivania2 commented 10 months ago

I wanted to test tarfs filesystem mounted on /mnt directory. We have made internal changes to support tarfs in linux-kernel

pevik commented 10 months ago

If you add it also to the array https://github.com/linux-test-project/ltp/blob/master/lib/tst_supported_fs_types.c#L21-L30 you'll get covered the tests which use .all_filesystems = 1 or TST_ALL_FILESYSTEMS=1 (otherwise they will not use tarfs.

shivania2 commented 10 months ago

Ok. I will try this

shivania2 commented 10 months ago

I have added the tarfs to array https://github.com/linux-test-project/ltp/blob/master/lib/tst_supported_fs_types.c#L21-L30. But while executing LTP test getting following error LTP_RUN_ON-2023_11_18-22h_27m_40s.output:217384:tst_supported_fs_types.c:91: TINFO: Kernel supports tarfs LTP_RUN_ON-2023_11_18-22h_27m_40s.output:217385:tst_supported_fs_types.c:52: TINFO: mkfs.tarfs does not exist . Any idea how to resolve this issue and is it possible to run only readonly filesystem tests in LTP?

pevik commented 10 months ago

If tarfs does not have mkfs.tarfs (I don't know myself), you should skip it for it similar way tmpfs skips it at least in lib/tst_supported_fs_types.c and lib/tst_mkfs.c.

BTW is it this tarfs https://github.com/Papierkorb/tarfs ? I wonder if there is magic assigned to tarfs. If yes, you probably want to find somewhere in the sources (in kernel or elsewhere) and add it to lib/tst_fs_type.c.

shivania2 commented 10 months ago

Thank You. I will add this change