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] fstat02: Verify st_ino field
Date: Mon, 15 Jun 2026 11:46:24 +0000 [thread overview]
Message-ID: <6a2fe610.cf2df9a4.29e9ad.20c6@mx.google.com> (raw)
In-Reply-To: <20260604150643.3433-1-always.starving0@gmail.com>
Hi Jinseok,
besides the error discovered by the agent, this patch is missing the
testing point. We are calling stat() on a hard link, which is actually
following the path and getting the file status information.
That means we are testing IF stat() provides the same inode number
of fstat() on the same file while following a hard link.
Why not just calling stat() on the file then? Also, they end up
calling the same vfs_getattr(), while only the path lookup actually
changes.
As you can see from the other tests for fstat()/stat()/lstat() syscalls,
the idea is to compare them _only_ when there's a layer in between them,
otherwise the information coming from the syscall should be compared only
with specific setup that we force on files before obtaining any data.
I will reject this patch for this reason, since a similar pattern has
been achieved by lstat03.c already.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-06-15 11:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 15:06 [LTP] [PATCH] fstat02: Verify st_ino field Jinseok Kim
2026-06-04 17:57 ` [LTP] " linuxtestproject.agent
2026-06-15 11:46 ` Andrea Cervesato via ltp [this message]
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=6a2fe610.cf2df9a4.29e9ad.20c6@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