[LTP] [PATCH v5] Add stat04 test

Cyril Hrubis chrubis@suse.cz
Tue Jul 2 15:26:19 CEST 2024


Hi!
> This test is basically a clone of the lstat03 test. I'm wondering if it 
> makes sense to have both, when we already have that one.

You are stil missing the point of this test, the end result we expect is
different for stat() and lstat(). The point I'm trying to make is that
we should:

1. Make sure that as many attributes are diffent for the symlink and the
   symlink target for *both* stat() and lstat() tests, since if they are
   not made different the test does results are not conclusive at all

2. For stat() you should get same result on the file and symlink since
   stat actually follows the symlink then gets the data

3. For lstat() you should get different result on the file and symlink
   since lstat() *does not* follow the symlink before it gets the data

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list