From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Jinseok Kim" <always.starving0@gmail.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v8 2/2] fstat: add test for multiple file types using fstat
Date: Mon, 15 Jun 2026 13:21:39 +0000 [thread overview]
Message-ID: <6a2ffc63.a08f2e7b.13a326.ef06@mx.google.com> (raw)
In-Reply-To: <20260604142029.2077-2-always.starving0@gmail.com>
Hi Jinseok,
> + int flags = O_RDONLY | O_NONBLOCK;
consider using O_PATH instead of O_RDONLY | O_NONBLOCK for device
nodes. fstat() works correctly on O_PATH file descriptors and returns
the right st_mode, without needing the underlying driver to be
present. Please use it in the SAFE_OPEN().
> +
> + if (tc->exp_type == S_IFDIR)
> + flags |= O_DIRECTORY;
> +
> + int fd = SAFE_OPEN(tc->path, flags);
The test does not gate on CONFIG_BLK_DEV_LOOP via .needs_kconfigs,
so SAFE_OPEN will TBROK on systems without loop support.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-06-15 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 14:20 [LTP] [PATCH v8 1/2] open: remove O_DIRECTORY case (move to fstat test) Jinseok Kim
2026-06-04 14:20 ` [LTP] [PATCH v8 2/2] fstat: add test for multiple file types using fstat Jinseok Kim
2026-06-15 13:21 ` Andrea Cervesato via ltp [this message]
2026-06-04 15:09 ` [LTP] open: remove O_DIRECTORY case (move to fstat test) 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=6a2ffc63.a08f2e7b.13a326.ef06@mx.google.com \
--to=ltp@lists.linux.it \
--cc=always.starving0@gmail.com \
--cc=andrea.cervesato@suse.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