From: Disha Goel <disgoel@linux.ibm.com>
To: ltp@lists.linux.it
Cc: disgoel@linux.ibm.com
Subject: [LTP] [PATCH v2] syscalls/ustat: Skip tests on Btrfs using .skip_filesystems
Date: Mon, 23 Mar 2026 16:37:35 +0530 [thread overview]
Message-ID: <20260323110735.55473-1-disgoel@linux.ibm.com> (raw)
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
next reply other threads:[~2026-03-23 11:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 11:07 Disha Goel [this message]
2026-03-23 12:48 ` [LTP] [PATCH v2] syscalls/ustat: Skip tests on Btrfs using .skip_filesystems Cyril Hrubis
2026-04-09 9:37 ` Cyril Hrubis
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=20260323110735.55473-1-disgoel@linux.ibm.com \
--to=disgoel@linux.ibm.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