Skip to content

Commit

Permalink
statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
Browse files Browse the repository at this point in the history
STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
(it's already skipped on tmpfs and XFS).

Link: https://lore.kernel.org/ltp/20231207194011.273027-4-pvorel@suse.cz/
Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed May 7, 2024
1 parent 67f1550 commit b8a5974
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testcases/kernel/syscalls/statx/statx04.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ 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, TMPFS */
if (!strcmp(tst_device->fs_type, "xfs") || !strcmp(tst_device->fs_type, "tmpfs"))
/* STATX_ATTR_COMPRESSED not supported on Bcachefs, TMPFS, XFS */
if (!strcmp(tst_device->fs_type, "bcachefs") || !strcmp(tst_device->fs_type, "tmpfs") ||
!strcmp(tst_device->fs_type, "xfs"))
expected_mask &= ~STATX_ATTR_COMPRESSED;

/* Attribute support was added to Btrfs statx() in kernel v4.13 */
Expand Down

0 comments on commit b8a5974

Please sign in to comment.