* [LTP] [PATCH v2] syscalls/ustat: Skip tests on Btrfs using .skip_filesystems
@ 2026-03-23 11:07 Disha Goel
2026-03-23 12:48 ` Cyril Hrubis
2026-04-09 9:37 ` Cyril Hrubis
0 siblings, 2 replies; 3+ messages in thread
From: Disha Goel @ 2026-03-23 11:07 UTC (permalink / raw)
To: ltp; +Cc: disgoel
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 <disgoel@linux.ibm.com>
---
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/20260318082438.50245-1-disgoel@linux.ibm.com/
---
testcases/kernel/syscalls/ustat/ustat01.c | 4 ++++
testcases/kernel/syscalls/ustat/ustat02.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
index 161006058..55095191b 100644
--- a/testcases/kernel/syscalls/ustat/ustat01.c
+++ b/testcases/kernel/syscalls/ustat/ustat01.c
@@ -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/e7e867b8-b57a-7eb2-2432-1627bd3a88fb@toxicpanda.com/"
diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
index 84becaa1f..82dcfb6b4 100644
--- a/testcases/kernel/syscalls/ustat/ustat02.c
+++ b/testcases/kernel/syscalls/ustat/ustat02.c
@@ -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/e7e867b8-b57a-7eb2-2432-1627bd3a88fb@toxicpanda.com/"
--
2.45.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-09 9:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 11:07 [LTP] [PATCH v2] syscalls/ustat: Skip tests on Btrfs using .skip_filesystems Disha Goel
2026-03-23 12:48 ` Cyril Hrubis
2026-04-09 9:37 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox