1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/symlink/00.t 211352 2010-08-15 21:24:17Z pjd $ 3 4desc="symlink creates symbolic links" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9echo "1..14" 10 11n0=`namegen` 12n1=`namegen` 13 14expect 0 create ${n0} 0644 15expect regular,0644 lstat ${n0} type,mode 16expect 0 symlink ${n0} ${n1} 17expect symlink lstat ${n1} type 18expect regular,0644 stat ${n1} type,mode 19expect 0 unlink ${n0} 20expect ENOENT stat ${n1} type,mode 21expect 0 unlink ${n1} 22 23expect 0 mkdir ${n0} 0755 24time=`${fstest} stat ${n0} ctime` 25sleep 1 26expect 0 symlink test ${n0}/${n1} 27mtime=`${fstest} stat ${n0} mtime` 28test_check $time -lt $mtime 29ctime=`${fstest} stat ${n0} ctime` 30test_check $time -lt $ctime 31expect 0 unlink ${n0}/${n1} 32expect 0 rmdir ${n0} 33