Re: [PATCH 4/4] xfstests: Check the stx_attributes settable by chattr [ver #9]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 06, 2017 at 08:36:19AM +0100, David Howells wrote:
> Check the stx_attributes that can be set by calling chattr.
> 
> The script probes the filesystem with chattr to find out which of +a, +c,
> +d and +i are supported before testing combinations of attrs.  Note that if
> a filesystem supports chattr with these, but doesn't paste the flag values
> into stx_attributes, the test will fail as there's no way to distinguish
> cleared from unset.
> 
> Certain chattr flags are reflected in specific stx_attributes flags:
> 
> 	chattr flag	stx_attributes flag
> 	+a		STATX_ATTR_APPEND
> 	+c		STATX_ATTR_COMPRESSED
> 	+d		STATX_ATTR_NODUMP
> 	+i		STATX_ATTR_IMMUTABLE
> 
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>

Thanks for the update! More nits follow :)

> ---
[snip]
>  
> -	check((B->tv_nsec - A->tv_nsec) >= 0,
> -	      "%s.nsec is before %s.nsec (%d < %d)\n",
> -	      B_name, A_name, B->tv_nsec, A->tv_nsec);
> +	if (B->tv_sec == A->tv_sec)
> +		check((B->tv_nsec - A->tv_nsec) >= 0,
> +		      "%s.nsec is before %s.nsec (%d < %d)\n",
> +		      B_name, A_name, B->tv_nsec, A->tv_nsec);
>  }

I think this hunk belongs to patch 2/4, make it right in the first
place, not introduce a bug and fix it later in the same patchset :)

[snip]
> diff --git a/tests/generic/422.out b/tests/generic/422.out
> index 21d6ffc..70a4eb6 100644
> --- a/tests/generic/422.out
> +++ b/tests/generic/422.out
> @@ -1,4 +1,4 @@
> -QA output created by 420
> +QA output created by 422
>  Test statx on a fifo
>  Test statx on a chardev
>  Test statx on a directory

This diff also belongs to the second patch.

Thanks,
Eryu
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux