[LTP] syscalls/unlink09: report unsupported inode flags as TCONF

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Tue Jun 2 13:23:35 CEST 2026


Hi XiaoLei,

On Tue, Jun 02, 2026 at 02:44:42PM +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.
>
> Signed-off-by: XiaoLei Wu <wxl18715129466@gmail.com>

Reviewed-by: LTP AI Reviewer <ltp@lists.linux.it>

The fix is correct. ENOTTY from FS_IOC_GETFLAGS means the filesystem
does not support inode attribute ioctls, which is a missing feature, not
a broken test. TCONF is the right result code, and this is consistent
with how statx08.c and statx09.c handle the same ioctl failure:

  tst_brk(TCONF | TERRNO, "FS_IOC_GETFLAGS not supported");

The patch is a one-line change and the commit message accurately
describes both what changed and why.

---

Pre-existing issues (not introduced by this patch, informational only):

1. testcases/kernel/syscalls/unlink/unlink09.c: After the ENOTTY branch
   in setup() closes fd_immutable and calls tst_brk(TCONF, ...), the
   variable fd_immutable still holds the (now-closed) file descriptor
   value — it is never reset to -1. When cleanup() later runs, the
   guard "if (fd_immutable != -1)" is true, so setup_inode_flag() is
   called on the already-closed fd, producing an EBADF error via
   SAFE_IOCTL, followed by a second SAFE_CLOSE on the same fd. Both
   statx08.c and statx09.c avoid this by not caching the fd in a
   global until after the FS_IOC_GETFLAGS probe succeeds.

LTP AI Reviewer


More information about the ltp mailing list