1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/symlink/11.t 211352 2010-08-15 21:24:17Z pjd $ 3 4desc="symlink returns ENOSPC if there are no free inodes on the file system on which the symbolic link is being created" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit 10 11echo "1..3" 12 13n0=`namegen` 14n1=`namegen` 15 16expect 0 mkdir ${n0} 0755 17n=`mdconfig -a -n -t malloc -s 512k` || exit 18newfs /dev/md${n} >/dev/null || exit 19mount /dev/md${n} ${n0} || exit 20i=0 21while :; do 22 ln -s test ${n0}/${i} >/dev/null 2>&1 23 if [ $? -ne 0 ]; then 24 break 25 fi 26 i=`expr $i + 1` 27done 28expect ENOSPC symlink test ${n0}/${n1} 29umount /dev/md${n} 30mdconfig -d -u ${n} || exit 31expect 0 rmdir ${n0} 32