public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
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 11:23:08 +0200	[thread overview]
Message-ID: <ZoZp_DbLtR-Y4NIh@yuki> (raw)
In-Reply-To: <ZoZov55YEzVMogMd@yuki>

Hi!
> > > +       /* change st_atime / st_mtime / st_ctime */
> > > +       sleep(1);
> > >
> > 
> > Does this 1sec sleep make real sense to the test? Can we remove it?
> 
> With utimensat we can easily change access time and modification time
> but you can't change status change time. So we either sleep here or set
> the system clock back, change the file and then reset the system clock
> back.

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.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-07-04  9:23 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 [this message]
2024-07-04 11:27         ` Li Wang
2024-07-04 11:55           ` Cyril Hrubis
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=ZoZp_DbLtR-Y4NIh@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