1*40a8ac8fSEnji Cooper#!/bin/sh 2*40a8ac8fSEnji Cooper# $FreeBSD: head/tools/regression/pjdfstest/tests/mkdir/11.t 211352 2010-08-15 21:24:17Z pjd $ 3*40a8ac8fSEnji Cooper 4*40a8ac8fSEnji Cooperdesc="mkdir returns ENOSPC if there are no free inodes on the file system on which the directory is being created" 5*40a8ac8fSEnji Cooper 6*40a8ac8fSEnji Cooperdir=`dirname $0` 7*40a8ac8fSEnji Cooper. ${dir}/../misc.sh 8*40a8ac8fSEnji Cooper 9*40a8ac8fSEnji Cooper[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit 10*40a8ac8fSEnji Cooper 11*40a8ac8fSEnji Cooperecho "1..3" 12*40a8ac8fSEnji Cooper 13*40a8ac8fSEnji Coopern0=`namegen` 14*40a8ac8fSEnji Coopern1=`namegen` 15*40a8ac8fSEnji Cooper 16*40a8ac8fSEnji Cooperexpect 0 mkdir ${n0} 0755 17*40a8ac8fSEnji Coopern=`mdconfig -a -n -t malloc -s 256k` 18*40a8ac8fSEnji Coopernewfs /dev/md${n} >/dev/null 19*40a8ac8fSEnji Coopermount /dev/md${n} ${n0} 20*40a8ac8fSEnji Cooperi=0 21*40a8ac8fSEnji Cooperwhile :; do 22*40a8ac8fSEnji Cooper mkdir ${n0}/${i} >/dev/null 2>&1 23*40a8ac8fSEnji Cooper if [ $? -ne 0 ]; then 24*40a8ac8fSEnji Cooper break 25*40a8ac8fSEnji Cooper fi 26*40a8ac8fSEnji Cooper i=`expr $i + 1` 27*40a8ac8fSEnji Cooperdone 28*40a8ac8fSEnji Cooperexpect ENOSPC mkdir ${n0}/${n1} 0755 29*40a8ac8fSEnji Cooperumount /dev/md${n} 30*40a8ac8fSEnji Coopermdconfig -d -u ${n} 31*40a8ac8fSEnji Cooperexpect 0 rmdir ${n0} 32