ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Li Wang <liwang@redhat.com>, "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] statx04: mask STATX_ATTR_COMPRESSED on tmpfs
Date: Thu, 18 Aug 2022 09:55:40 +0000	[thread overview]
Message-ID: <da253a0e-d082-9329-3392-aacee81e6c8d@fujitsu.com> (raw)
In-Reply-To: <20220818095030.1964355-1-liwang@redhat.com>

Hi Li

> Recently a new kernel commit (e408e695f) introduces the inode attributes
> being supported in tmpfs, which is like other Linux file systems. But that
> caused statx04 to throw an unsupported error in STATX_ATTR_COMPRESSED.
> 
> This patch help masks it just like what we did for XFS.

Looks good to me,
Reviewed-by: Yang Xu <xuyang2018.jy@fujitsu.com>

Best Regards
Yang Xu

>
>      tst_test.c:1599: TINFO: Testing on tmpfs
>      tst_test.c:1064: TINFO: Skipping mkfs for TMPFS filesystem
>      tst_test.c:1045: TINFO: Limiting tmpfs size to 32MB
>      statx04.c:114: TFAIL: STATX_ATTR_COMPRESSED not supported
>      statx04.c:112: TPASS: STATX_ATTR_APPEND is supported
>      statx04.c:112: TPASS: STATX_ATTR_IMMUTABLE is supported
>      statx04.c:112: TPASS: STATX_ATTR_NODUMP is supported
> 
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
>   testcases/kernel/syscalls/statx/statx04.c | 13 ++++++++++---
>   1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/statx/statx04.c b/testcases/kernel/syscalls/statx/statx04.c
> index 083298310..03d909534 100644
> --- a/testcases/kernel/syscalls/statx/statx04.c
> +++ b/testcases/kernel/syscalls/statx/statx04.c
> @@ -17,7 +17,7 @@
>    * xfs filesystem doesn't support STATX_ATTR_COMPRESSED flag, so we only test
>    * three other flags.
>    *
> - * ext2, ext4, btrfs and xfs support statx syscall since the following commit
> + * ext2, ext4, btrfs, xfs and tmpfs support statx syscall since the following commit
>    *
>    *  commit 93bc420ed41df63a18ae794101f7cbf45226a6ef
>    *  Author: yangerkun <yangerkun@huawei.com>
> @@ -42,6 +42,13 @@
>    *  Date:   Fri Mar 31 18:32:03 2017 +0100
>    *
>    *  xfs: report crtime and attribute flags to statx
> + *
> + *  commit e408e695f5f1f60d784913afc45ff2c387a5aeb8
> + *  Author: Theodore Ts'o <tytso@mit.edu>
> + *  Date:   Thu Jul 14 21:59:12 2022 -0400
> + *
> + *  mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs
> + *
>    */
>   
>   #define _GNU_SOURCE
> @@ -88,8 +95,8 @@ static void setup(void)
>   	for (i = 0, expected_mask = 0; i < ARRAY_SIZE(attr_list); i++)
>   		expected_mask |= attr_list[i].attr;
>   
> -	/* STATX_ATTR_COMPRESSED not supported on XFS */
> -	if (!strcmp(tst_device->fs_type, "xfs"))
> +	/* STATX_ATTR_COMPRESSED not supported on XFS, TMPFS */
> +	if (!strcmp(tst_device->fs_type, "xfs") || !strcmp(tst_device->fs_type, "tmpfs"))
>   		expected_mask &= ~STATX_ATTR_COMPRESSED;
>   
>   	/* Attribute support was added to Btrfs statx() in kernel v4.13 */

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-08-18  9:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18  9:50 [LTP] [PATCH] statx04: mask STATX_ATTR_COMPRESSED on tmpfs Li Wang
2022-08-18  9:55 ` xuyang2018.jy [this message]
2022-08-18  9:59   ` Li Wang
2022-08-19  6:21     ` Li Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da253a0e-d082-9329-3392-aacee81e6c8d@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).