xref: /freebsd/contrib/pjdfstest/tests/chown/04.t (revision f4b37ed0f8b307b1f3f0f630ca725d68f1dff30d)
1#!/bin/sh
2# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/04.t 211410 2010-08-17 06:08:09Z pjd $
3
4desc="chown returns ENOENT if the named file does not exist"
5
6dir=`dirname $0`
7. ${dir}/../misc.sh
8
9echo "1..9"
10
11n0=`namegen`
12n1=`namegen`
13n2=`namegen`
14
15expect 0 mkdir ${n0} 0755
16expect ENOENT chown ${n0}/${n1}/test 65534 65534
17expect ENOENT chown ${n0}/${n1} 65534 65534
18expect ENOENT lchown ${n0}/${n1}/test 65534 65534
19expect ENOENT lchown ${n0}/${n1} 65534 65534
20expect 0 symlink ${n2} ${n0}/${n1}
21expect ENOENT chown ${n0}/${n1} 65534 65534
22expect 0 unlink ${n0}/${n1}
23expect 0 rmdir ${n0}
24