]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/pjdfstest/tests/symlink/00.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / pjdfstest / tests / symlink / 00.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="symlink creates symbolic links"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..14"
10
11 n0=`namegen`
12 n1=`namegen`
13
14 expect 0 create ${n0} 0644
15 expect regular,0644 lstat ${n0} type,mode
16 expect 0 symlink ${n0} ${n1}
17 expect symlink lstat ${n1} type
18 expect regular,0644 stat ${n1} type,mode
19 expect 0 unlink ${n0}
20 expect ENOENT stat ${n1} type,mode
21 expect 0 unlink ${n1}
22
23 expect 0 mkdir ${n0} 0755
24 time=`${fstest} stat ${n0} ctime`
25 sleep 1
26 expect 0 symlink test ${n0}/${n1}
27 mtime=`${fstest} stat ${n0} mtime`
28 test_check $time -lt $mtime
29 ctime=`${fstest} stat ${n0} ctime`
30 test_check $time -lt $ctime
31 expect 0 unlink ${n0}/${n1}
32 expect 0 rmdir ${n0}