Re: [LTP] [PATCH] syscalls/setxattr03: turn off immutable and append bit only if already set

Caspar Zhang
2012-07-02T11:00:12Z

On 07/02/2012 06:53 PM, Eryu Guan wrote:
>
> Turn off immutable and append-only attribute in cleanup() only if they
> are already turned on. Otherwise bogus WARNING would fail test case when
> no xattr support in fs or mount without user_xattr option.
>
> setxattr03 1 TCONF : No xattr support in fs or fs mounted without user_xattr option
> setxattr03 2 TCONF : Remaining cases not appropriate for configuration
> setxattr03 0 TWARN : Unset setxattr03immutable immutable failed: errno=EINVAL(22): Invalid argument
> setxattr03 0 TWARN : Unset setxattr03appendonly append-only failed: errno=EINVAL(22): Invalid argument
>
> (The check-fd-value way is not perfect, but I think it's much more
> easier and could cover the most common case.)
>
> Signed-off-by: Eryu Guan <eguan@redhat.com>

Looks good to me.

Reviewed-by: Caspar Zhang <caspar@casparzhang.com>