[LTP] [PATCH v3] fcntl/fcntl32.c: add F_SETLEASE and F_WRLCK argument test

Cyril Hrubis chrubis@suse.cz
Wed Sep 30 18:41:33 CEST 2015


Hi!
> +int main(int ac, char **av)
> +{
> +	int lc;
> +	int tc;
> +	long type;
> +
> +	tst_parse_opts(ac, av, NULL, NULL);
> +
> +	setup();
> +
> +	switch ((type = tst_fs_type(cleanup, "."))) {
> +	case TST_NFS_MAGIC:
> +	case TST_RAMFS_MAGIC:
> +	case TST_TMPFS_MAGIC:
> +		tst_brkm(TCONF, cleanup, "%s filesystem does not support "
> +			 "fcntl(2)'s F_SETLEASE operation",
> +			 tst_fs_type_name(type));
> +	default:
> +		break;
> +	}

Same as the second one. I would preffer figuring out that the fcntl() is
unsupported by actually trying to use it.


Otherwise it looks fine.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the Ltp mailing list