* [LTP] [PATCH] statx04: mask STATX_ATTR_COMPRESSED on tmpfs
@ 2022-08-18 9:50 Li Wang
2022-08-18 9:55 ` xuyang2018.jy
0 siblings, 1 reply; 4+ messages in thread
From: Li Wang @ 2022-08-18 9:50 UTC (permalink / raw)
To: ltp
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.
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 */
--
2.35.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] statx04: mask STATX_ATTR_COMPRESSED on tmpfs
2022-08-18 9:50 [LTP] [PATCH] statx04: mask STATX_ATTR_COMPRESSED on tmpfs Li Wang
@ 2022-08-18 9:55 ` xuyang2018.jy
2022-08-18 9:59 ` Li Wang
0 siblings, 1 reply; 4+ messages in thread
From: xuyang2018.jy @ 2022-08-18 9:55 UTC (permalink / raw)
To: Li Wang, ltp
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] statx04: mask STATX_ATTR_COMPRESSED on tmpfs
2022-08-18 9:55 ` xuyang2018.jy
@ 2022-08-18 9:59 ` Li Wang
2022-08-19 6:21 ` Li Wang
0 siblings, 1 reply; 4+ messages in thread
From: Li Wang @ 2022-08-18 9:59 UTC (permalink / raw)
To: xuyang2018.jy; +Cc: ltp
[-- Attachment #1.1: Type: text/plain, Size: 803 bytes --]
On Thu, Aug 18, 2022 at 5:55 PM xuyang2018.jy@fujitsu.com <
xuyang2018.jy@fujitsu.com> wrote:
> 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,
>
Thanks, I suddenly realized that we need to add the commit info into .tag
as well.
@@ -132,6 +139,7 @@ static struct tst_test test = {
{"linux-git", "99652ea56a41"},
{"linux-git", "04a87e347282"},
{"linux-git", "5f955f26f3d4"},
+ {"linux-git", "e408e695f5f1"},
{}
},
--
Regards,
Li Wang
[-- Attachment #1.2: Type: text/html, Size: 1699 bytes --]
[-- Attachment #2: Type: text/plain, Size: 60 bytes --]
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-19 6:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18 9:50 [LTP] [PATCH] statx04: mask STATX_ATTR_COMPRESSED on tmpfs Li Wang
2022-08-18 9:55 ` xuyang2018.jy
2022-08-18 9:59 ` Li Wang
2022-08-19 6:21 ` Li Wang
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).