]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - tools/regression/pjdfstest/tests/mknod/03.t
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / tools / regression / pjdfstest / tests / mknod / 03.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="mknod returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..12"
10
11 nx=`dirgen_max`
12 nxx="${nx}x"
13
14 mkdir -p "${nx%/*}"
15
16 expect 0 mknod ${nx} f 0644 0 0
17 expect fifo stat ${nx} type
18 expect 0 unlink ${nx}
19 expect ENAMETOOLONG mknod ${nxx} f 0644 0 0
20
21 expect 0 mknod ${nx} b 0644 1 2
22 expect block stat ${nx} type
23 expect 0 unlink ${nx}
24 expect ENAMETOOLONG mknod ${nxx} b 0644 1 2
25
26 expect 0 mknod ${nx} c 0644 1 2
27 expect char stat ${nx} type
28 expect 0 unlink ${nx}
29 expect ENAMETOOLONG mknod ${nxx} c 0644 1 2
30
31 rm -rf "${nx%%/*}"