syscalls/ustat: Skip tests on Btrfs using .skip_filesystems
PATCH v2 1/1 syscalls/ustat: Skip tests on Btrfs using .skip_filesystems
The ustat(2) system call is known to fail with EINVAL on Btrfs because it uses anonymous device IDs for subvolumes, which this legacy syscall cannot resolve to a physical block device.
Currently, this results in a TFAIL, which causes false negatives in automated CI environments (e.g., SLES). This patch utilizes the LTP library's .skip_filesystems mechanism to gracefully skip the tests (TCONF) when executed on Btrfs.
Signed-off-by Disha Goel <[email protected]>
---
Changelog v1 -> v2:
- Removed manual statfs/tst_brk logic in setup().
- Implemented .skip_filesystems in the tst_test structure for both ustat01 and ustat02.
Link to v1:
https://lore.kernel.org/all/[email protected]/
--- testcases/kernel/syscalls/ustat/ustat01.c | 4 ++++ testcases/kernel/syscalls/ustat/ustat02.c | 4 ++++ 2 files changed, 8 insertions(+)
testcases/kernel/syscalls/ustat/ustat01.c +4 -0
@@ -44,6 +44,10 @@ static void setup(void)static struct tst_test test = { .test_all = run, .setup = setup, + .skip_filesystems = (const char *const []) { +"btrfs" , +NULL + }, .tags = (const struct tst_tag []) { {"known-fail" ,"ustat() is known to fail with EINVAL on Btrfs, see " "https://lore.kernel.org/linux-btrfs/[email protected]/"
testcases/kernel/syscalls/ustat/ustat02.c +4 -0
@@ -61,6 +61,10 @@ static struct tst_test test = { .test = run, .setup = setup, .tcnt = ARRAY_SIZE(tc), + .skip_filesystems = (const char *const []) { +"btrfs" , +NULL + }, .tags = (const struct tst_tag []) { {"known-fail" ,"ustat() is known to fail with EINVAL on Btrfs, see " "https://lore.kernel.org/linux-btrfs/[email protected]/"
Signature · 5 lines
2.45.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Reviewed-by Cyril Hrubis <[email protected]>
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Applied, thanks.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp