1*40a8ac8fSEnji Cooper#!/bin/sh 2*40a8ac8fSEnji Cooper# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/03.t 211352 2010-08-15 21:24:17Z pjd $ 3*40a8ac8fSEnji Cooper 4*40a8ac8fSEnji Cooperdesc="truncate returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters" 5*40a8ac8fSEnji Cooper 6*40a8ac8fSEnji Cooperdir=`dirname $0` 7*40a8ac8fSEnji Cooper. ${dir}/../misc.sh 8*40a8ac8fSEnji Cooper 9*40a8ac8fSEnji Cooperecho "1..5" 10*40a8ac8fSEnji Cooper 11*40a8ac8fSEnji Coopernx=`dirgen_max` 12*40a8ac8fSEnji Coopernxx="${nx}x" 13*40a8ac8fSEnji Cooper 14*40a8ac8fSEnji Coopermkdir -p "${nx%/*}" 15*40a8ac8fSEnji Cooper 16*40a8ac8fSEnji Cooperexpect 0 create ${nx} 0644 17*40a8ac8fSEnji Cooperexpect 0 truncate ${nx} 123 18*40a8ac8fSEnji Cooperexpect regular,123 stat ${nx} type,size 19*40a8ac8fSEnji Cooperexpect 0 unlink ${nx} 20*40a8ac8fSEnji Cooperexpect ENAMETOOLONG truncate ${nxx} 123 21*40a8ac8fSEnji Cooper 22*40a8ac8fSEnji Cooperrm -rf "${nx%%/*}" 23