[LTP] [PATCH v4 2/2] lib/tst_test.c: Add .needs_devfs flag

Xiao Yang yangx.jy@cn.fujitsu.com
Mon Sep 3 04:14:12 CEST 2018


On 2018/08/31 20:31, Cyril Hrubis wrote:
> Hi!
>> +static void prepare_and_mount_dev_fs(const char *mntpoint)
>> +{
>> +	const char *flags[] = {"nodev", NULL};
>> +	int mounted_nodev;
>> +
>> +	mounted_nodev = tst_path_has_mnt_flags(NULL, NULL, flags);
>> +	if (mounted_nodev) {
>> +		tst_res(TINFO, "tmpdir isn't suitable for creating devices, "
>> +			"so mount tmpfs without nodev on %s", mntpoint);
>> +		SAFE_MOUNT(NULL, mntpoint, "tmpfs", 0, NULL);
>> +		mntpoint_mounted = 1;
>> +	}
>> +}
> That is even better than my version, nice :-).
>
> There is a last nit to solve, the problem is that
> tst_path_has_mnt_flags() is defined in old/test.h, we have to move the
> definition to a separate header file (in a separate patch) so that it
> could be included in test.h, tst_path_has_mnt_flags.c, and tst_test.c.
Hi Cyril,

This is a patch set, and i have factored out tst_path_has_mnt_flags() by 
the first patch:
http://lists.linux.it/pipermail/ltp/2018-August/009013.html

Thanks,
Xiao Yang
> I can do that or you can sent v5, your choice.
>





More information about the ltp mailing list