1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/03.t 211352 2010-08-15 21:24:17Z pjd $ 3 4desc="chflags returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9require chflags 10 11echo "1..12" 12 13nx=`dirgen_max` 14nxx="${nx}x" 15 16mkdir -p "${nx%/*}" 17 18expect 0 create ${nx} 0644 19expect 0 chflags ${nx} SF_IMMUTABLE 20expect SF_IMMUTABLE stat ${nx} flags 21expect 0 chflags ${nx} none 22expect 0 unlink ${nx} 23expect ENAMETOOLONG chflags ${nxx} SF_IMMUTABLE 24 25expect 0 create ${nx} 0644 26expect 0 lchflags ${nx} SF_IMMUTABLE 27expect SF_IMMUTABLE stat ${nx} flags 28expect 0 lchflags ${nx} none 29expect 0 unlink ${nx} 30expect ENAMETOOLONG lchflags ${nxx} SF_IMMUTABLE 31 32rm -rf "${nx%%/*}" 33