[LTP] [PATCH] syscalls/statx04: use stx_attributes_mask before test

Cyril Hrubis chrubis@suse.cz
Fri Aug 2 13:50:46 CEST 2019


Hi!
> +	/* Mask to show which attributes are supported on filesystem. */
> +	if ((buf.stx_attributes_mask & FS_COMPR_FL) == 0)
> +		tst_brk(TCONF, "filesystem doesn't support FS_COMPR_FL");
> +	if ((buf.stx_attributes_mask & FS_APPEND_FL) == 0)
> +		tst_brk(TCONF, "filesystem doesn't support FS_APPEND_FL");
> +	if ((buf.stx_attributes_mask & FS_IMMUTABLE_FL) == 0)
> +		tst_brk(TCONF, "filesystem doesn't support FS_IMMUTABLE_FL");
> +	if ((buf.stx_attributes_mask & FS_NODUMP_FL) == 0)
> +		tst_brk(TCONF, "filesystem doesn't support FS_NODUMP_FL");

I doubt that all these flags are either set or unset for a given
fileystem, can we rather than this set flags such as supp_compr etc and
disable only tests for a subset of unsupported flags rather than the
whole test?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list