From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/5] Add stat04 test
Date: Thu, 4 Jul 2024 13:55:57 +0200 [thread overview]
Message-ID: <ZoaNzek2_dEr6CMD@yuki> (raw)
In-Reply-To: <CAEemH2cB8naFy3Mjm01D42m4F7OFtYjivMivcS+RJzo+e+n6Dg@mail.gmail.com>
Hi!
> > And if you are asking if the test will run fine without the sleep, it
> > will run and it will pass, but the timestamps will be same for the link
> > and the file, so if kernel picks up wrong timestamp we will not find
> > out.
> >
>
> I'm confused, do you mean if the kernel sets a wrong timestamp it could
> report TFAIL?
>
> From what I can tell, the stat(sym_path,) also retrieves information of
> the target file,
> shouldn't that always equal the stat(file_path,) timestamp? As long as the
> stat()
> works correctly, with sleep(1) or not won't impact anything.
The test tries to assert that stat() follows the symlink and this test
is a unit test for this assertion. However if we do not spend some
effort on making the link and target attributes actually diffferent the
test would pass even if kernel returned the attributes for the symlink
instead.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-07-04 11:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 14:12 [LTP] [PATCH 0/5] symlink01 split Andrea Cervesato
2024-07-02 14:12 ` [LTP] [PATCH 1/5] Add stat04 test Andrea Cervesato
2024-07-04 7:06 ` Li Wang
2024-07-04 9:17 ` Cyril Hrubis
2024-07-04 9:23 ` Cyril Hrubis
2024-07-04 11:27 ` Li Wang
2024-07-04 11:55 ` Cyril Hrubis [this message]
2024-07-04 12:02 ` Li Wang
2024-07-02 14:12 ` [LTP] [PATCH 2/5] Fix TST_EXP_EXTR() stringification Andrea Cervesato
2024-07-04 7:11 ` Li Wang
2024-07-04 9:19 ` Cyril Hrubis
2024-07-02 14:12 ` [LTP] [PATCH 3/5] Add lstat03 test Andrea Cervesato
2024-07-04 6:36 ` Li Wang
2024-07-04 6:56 ` Li Wang
2024-07-02 14:12 ` [LTP] [PATCH 4/5] Add chmod08 test Andrea Cervesato
2024-07-04 7:12 ` Li Wang
2024-07-02 14:12 ` [LTP] [PATCH 5/5] Add open15 test Andrea Cervesato
2024-07-04 7:18 ` Li Wang
2024-07-04 7:32 ` Li Wang
2024-07-09 10:31 ` Andrea Cervesato via ltp
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=ZoaNzek2_dEr6CMD@yuki \
--to=chrubis@suse.cz \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
/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