1#!/bin/sh
| 1#!/bin/sh
|
2# $FreeBSD: head/tools/regression/fstest/tests/mknod/03.t 210967 2010-08-06 20:51:39Z pjd $
| 2# $FreeBSD: head/tools/regression/fstest/tests/mknod/03.t 211178 2010-08-11 16:33:17Z pjd $
|
3
| 3
|
4desc="mknod returns ENAMETOOLONG if an entire path name exceeded 1023 characters"
| 4desc="mknod returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"
|
5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8
| 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8
|
9echo "1..11"
| 9echo "1..12"
|
10
| 10
|
11expect 0 mkdir ${name255} 0755 # 1 12expect 0 mkdir ${name255}/${name255} 0755 # 2 13expect 0 mkdir ${name255}/${name255}/${name255} 0755 # 3 14expect 0 mkdir ${path1021} 0755 # 4 15expect 0 mknod ${path1023} f 0644 0 0 # 5 16expect 0 unlink ${path1023} # 6 17expect ENAMETOOLONG mknod ${path1024} f 0644 0 0 # 7 18expect 0 rmdir ${path1021} # 8 19expect 0 rmdir ${name255}/${name255}/${name255} # 9 20expect 0 rmdir ${name255}/${name255} # 10 21expect 0 rmdir ${name255} # 11
| 11nx=`dirgen_max` 12nxx="${nx}x" 13 14mkdir -p "${nx%/*}" 15 16expect 0 mknod ${nx} f 0644 0 0 17expect fifo stat ${nx} type 18expect 0 unlink ${nx} 19expect ENAMETOOLONG mknod ${nxx} f 0644 0 0 20 21expect 0 mknod ${nx} b 0644 1 2 22expect block stat ${nx} type 23expect 0 unlink ${nx} 24expect ENAMETOOLONG mknod ${nxx} b 0644 1 2 25 26expect 0 mknod ${nx} c 0644 1 2 27expect char stat ${nx} type 28expect 0 unlink ${nx} 29expect ENAMETOOLONG mknod ${nxx} c 0644 1 2 30 31rm -rf "${nx%%/*}"
|
| |