xref: /freebsd/contrib/pjdfstest/tests/utimensat/09.t (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1#! /bin/sh
2# vim: filetype=sh noexpandtab ts=8 sw=8
3# $FreeBSD$
4
5desc="utimensat is y2038 compliant"
6
7dir=`dirname $0`
8. ${dir}/../misc.sh
9
10require "utimensat"
11
12echo "1..7"
13
14require utimensat
15
16n0=`namegen`
17n1=`namegen`
18DATE1=2147483648	# 2^31, ie Mon Jan 18 20:14:08 MST 2038
19DATE2=4294967296	# 2^32, ie Sat Feb  6 23:28:16 MST 2106
20
21expect 0 mkdir ${n1} 0755
22cdir=`pwd`
23cd ${n1}
24
25
26create_file regular ${n0}
27expect 0 open . O_RDONLY : utimensat 0 ${n0} $DATE1 0 $DATE2 0 0
28expect $DATE1 lstat ${n0} atime
29expect $DATE2 lstat ${n0} mtime
30
31
32expect 0 unlink ${n0}
33
34cd ${cdir}
35expect 0 rmdir ${n1}
36