[LTP] [PATCH] fstat02: Verify st_ino field
Andrea Cervesato
andrea.cervesato@suse.com
Mon Jun 15 13:46:24 CEST 2026
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
More information about the ltp
mailing list