1271294Sngie#!/bin/sh 2271294Sngie# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/03.t 211352 2010-08-15 21:24:17Z pjd $ 3271294Sngie 4271294Sngiedesc="chflags returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters" 5271294Sngie 6271294Sngiedir=`dirname $0` 7271294Sngie. ${dir}/../misc.sh 8271294Sngie 9271294Sngierequire chflags 10271294Sngie 11271294Sngieecho "1..12" 12271294Sngie 13271294Sngienx=`dirgen_max` 14271294Sngienxx="${nx}x" 15271294Sngie 16271294Sngiemkdir -p "${nx%/*}" 17271294Sngie 18271294Sngieexpect 0 create ${nx} 0644 19271294Sngieexpect 0 chflags ${nx} SF_IMMUTABLE 20271294Sngieexpect SF_IMMUTABLE stat ${nx} flags 21271294Sngieexpect 0 chflags ${nx} none 22271294Sngieexpect 0 unlink ${nx} 23271294Sngieexpect ENAMETOOLONG chflags ${nxx} SF_IMMUTABLE 24271294Sngie 25271294Sngieexpect 0 create ${nx} 0644 26271294Sngieexpect 0 lchflags ${nx} SF_IMMUTABLE 27271294Sngieexpect SF_IMMUTABLE stat ${nx} flags 28271294Sngieexpect 0 lchflags ${nx} none 29271294Sngieexpect 0 unlink ${nx} 30271294Sngieexpect ENAMETOOLONG lchflags ${nxx} SF_IMMUTABLE 31271294Sngie 32271294Sngierm -rf "${nx%%/*}" 33