1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/mknod/03.t 211352 2010-08-15 21:24:17Z pjd $ 3 4desc="mknod returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9echo "1..12" 10 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%%/*}" 32