2 # vim: filetype=sh noexpandtab ts=8 sw=8
5 desc="utimensat can set timestamps with subsecond precision"
16 # Different file systems have different timestamp resolutions. Check that they
17 # can do 0.1 second, but don't bother checking the finest resolution.
18 DATE1=100000000 #Sat Mar 3 02:46:40 MST 1973
20 DATE2=200000000 #Mon May 3 13:33:20 MDT 1976
23 expect 0 mkdir ${n1} 0755
27 create_file regular ${n0} 0644
28 expect 0 open . O_RDONLY : utimensat 0 ${n0} $DATE1 $DATE1_NS $DATE2 $DATE2_NS 0
29 expect $DATE1_NS lstat ${n0} atime_ns
30 expect $DATE2_NS lstat ${n0} mtime_ns
31 if supported "stat_st_birthtime"; then
32 expect $DATE2_NS lstat ${n0} birthtime_ns