[LTP] [PATCH 1/5] Add stat04 test

Cyril Hrubis chrubis@suse.cz
Thu Jul 4 11:17:51 CEST 2024


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.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list