]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/pjdfstest/tests/mknod/03.t
Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details
[FreeBSD/FreeBSD.git] / contrib / pjdfstest / tests / mknod / 03.t
1 #!/bin/sh
2 # vim: filetype=sh noexpandtab ts=8 sw=8
3 # $FreeBSD: head/tools/regression/pjdfstest/tests/mknod/03.t 211352 2010-08-15 21:24:17Z pjd $
4
5 desc="mknod returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"
6
7 dir=`dirname $0`
8 . ${dir}/../misc.sh
9
10 echo "1..12"
11
12 nx=`dirgen_max`
13 nxx="${nx}x"
14
15 mkdir -p "${nx%/*}"
16
17 expect 0 mknod ${nx} f 0644 0 0
18 expect fifo stat ${nx} type
19 expect 0 unlink ${nx}
20 expect ENAMETOOLONG mknod ${nxx} f 0644 0 0
21
22 expect 0 mknod ${nx} b 0644 1 2
23 expect block stat ${nx} type
24 expect 0 unlink ${nx}
25 expect ENAMETOOLONG mknod ${nxx} b 0644 1 2
26
27 expect 0 mknod ${nx} c 0644 1 2
28 expect char stat ${nx} type
29 expect 0 unlink ${nx}
30 expect ENAMETOOLONG mknod ${nxx} c 0644 1 2
31
32 rm -rf "${nx%%/*}"