[LTP] [PATCH v2 2/4] lib/tst_test.c: add .needs_devfs flag

Xiao Yang yangx.jy@cn.fujitsu.com
Fri Aug 17 06:26:55 CEST 2018


On 2018/08/16 21:28, Cyril Hrubis wrote:
> Hi!
>> We add .needs_devfs flag to prepare a suitable filesystem to test
>> device special files and use ext2 instead of tmpfs(because tmpfs
>> doesn't support extended attributes) as default filesystem if
>> .dev_fs_type is not specified.
> Can we do that only if the test temporary directory is not suitable for
> creating devices?
>
> There are distributions out there that have /tmp residing on pretty much
> normal filesystems, also user can override TMPDIR to point to a path
> backed up by a regular fs. In these cases this will slow down these
> tests for no good reason.
>
> So I would rather go for:
>
> if tst_test->needs_devfs is set:
>
> * mkdir tst_test->mntpoint if it does not exits
> * check if tst_test->mntpoint is suitable for creating devices
> * if not, mount some filesystem over it
>    - mounting tmpfs without nodev flag should be more than enough
>      and if that fails for you, we can fall back to a regular filesystem
Hi Cyril,

Thanks for your review and suggestion.

Mounting tmpfs without nodev over tst_test->mntpoint doesn't fail for 
me, so it isn't
necessary to mount a regular filesystem instead of tmpfs  over 
tst_test->mntpoint.

Thanks,
Xiao Yang





More information about the ltp mailing list