2007-01-17 01:42:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2010-08-11 16:33:17 +00:00
|
|
|
desc="rename returns ENAMETOOLONG if a component of either pathname exceeded {NAME_MAX} characters"
|
2007-01-17 01:42:12 +00:00
|
|
|
|
|
|
|
dir=`dirname $0`
|
|
|
|
. ${dir}/../misc.sh
|
|
|
|
|
|
|
|
echo "1..8"
|
|
|
|
|
|
|
|
n0=`namegen`
|
2010-08-11 16:33:17 +00:00
|
|
|
nx=`namegen_max`
|
|
|
|
nxx="${nx}x"
|
2007-01-17 01:42:12 +00:00
|
|
|
|
2010-08-11 16:33:17 +00:00
|
|
|
expect 0 create ${nx} 0644
|
|
|
|
expect 0 rename ${nx} ${n0}
|
|
|
|
expect 0 rename ${n0} ${nx}
|
|
|
|
expect 0 unlink ${nx}
|
2007-01-17 01:42:12 +00:00
|
|
|
|
|
|
|
expect 0 create ${n0} 0644
|
2010-08-11 16:33:17 +00:00
|
|
|
expect ENAMETOOLONG rename ${n0} ${nxx}
|
2007-01-17 01:42:12 +00:00
|
|
|
expect 0 unlink ${n0}
|
2010-08-11 16:33:17 +00:00
|
|
|
expect ENAMETOOLONG rename ${nxx} ${n0}
|