Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: XiaoLei Wu <wxl18715129466@gmail.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] syscalls/unlink09: report unsupported inode flags as TCONF
Date: Tue,  2 Jun 2026 11:23:45 +0000	[thread overview]
Message-ID: <20260602112345.4019-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260602061441.718227-1-wxl18715129466@gmail.com>

Hi XiaoLei Wu,

On Tue, Jun  2, 2026 at 14:14:41 +0800, XiaoLei Wu wrote:
> syscalls/unlink09: report unsupported inode flags as TCONF
>
> If FS_IOC_GETFLAGS fails with ENOTTY, the filesystem does not support
> inode flags. This is an unsupported test configuration rather than a
> broken test setup, so report TCONF instead of TBROK.

The change is correct. ENOTTY from FS_IOC_GETFLAGS means the kernel/
filesystem does not implement the ioctl at all, which is definitionally
an unsupported test configuration, not a broken test environment. TCONF
is the right result code.

Commit message is accurate and well-structured.

> diff --git a/testcases/kernel/syscalls/unlink/unlink09.c b/testcases/kernel/syscalls/unlink/unlink09.c
> @@ -63,7 +63,7 @@ static void setup(void)
>         if (TST_RET == -1 && TST_ERR == ENOTTY) {
>                 SAFE_CLOSE(fd_immutable);
>
> -               tst_brk(TBROK, "Inode attributes not supported by '%s'",
> +               tst_brk(TCONF, "Inode attributes not supported by '%s'",
>                         tst_device->fs_type);
>         }

LGTM. When FS_IOC_GETFLAGS returns ENOTTY the filesystem does not
support inode attribute flags; the test cannot run on such a
filesystem so TCONF is correct.

---
Pre-existing issues (informational, do not affect verdict):

In setup(), after SAFE_CLOSE(fd_immutable), fd_immutable still holds
its non-(-1) value when tst_brk() is called. Because tst_brk() invokes
cleanup(), and cleanup() checks `if (fd_immutable != -1)`, it will call
setup_inode_flag() (which does FS_IOC_GETFLAGS+FS_IOC_SETFLAGS) and
SAFE_CLOSE() on an already-closed descriptor.

Fix:

	SAFE_CLOSE(fd_immutable);
+	fd_immutable = -1;
	tst_brk(TCONF, "Inode attributes not supported by '%s'",
		tst_device->fs_type);

---
Reviewed-by: LTP AI Reviewer

LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-06-02 11:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02  6:14 [LTP] [PATCH] syscalls/unlink09: report unsupported inode flags as TCONF XiaoLei Wu
2026-06-02 11:23 ` linuxtestproject.agent [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-06-02  6:44 XiaoLei Wu
2026-06-02 11:23 ` [LTP] " linuxtestproject.agent

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=20260602112345.4019-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=wxl18715129466@gmail.com \
    /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