140a8ac8fSEnji Cooper#!/bin/sh 2*3416500aSEnji Cooper# vim: filetype=sh noexpandtab ts=8 sw=8 340a8ac8fSEnji Cooper# $FreeBSD: head/tools/regression/pjdfstest/tests/mkdir/11.t 211352 2010-08-15 21:24:17Z pjd $ 440a8ac8fSEnji Cooper 540a8ac8fSEnji Cooperdesc="mkdir returns ENOSPC if there are no free inodes on the file system on which the directory is being created" 640a8ac8fSEnji Cooper 740a8ac8fSEnji Cooperdir=`dirname $0` 840a8ac8fSEnji Cooper. ${dir}/../misc.sh 940a8ac8fSEnji Cooper 1040a8ac8fSEnji Cooper[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit 1140a8ac8fSEnji Cooper 1240a8ac8fSEnji Cooperecho "1..3" 1340a8ac8fSEnji Cooper 1440a8ac8fSEnji Coopern0=`namegen` 1540a8ac8fSEnji Coopern1=`namegen` 1640a8ac8fSEnji Cooper 1740a8ac8fSEnji Cooperexpect 0 mkdir ${n0} 0755 184ba73429SEnji Coopern=`mdconfig -a -n -t malloc -s 512k` || exit 194ba73429SEnji Coopernewfs /dev/md${n} >/dev/null || exit 204ba73429SEnji Coopermount /dev/md${n} ${n0} || exit 2140a8ac8fSEnji Cooperi=0 2240a8ac8fSEnji Cooperwhile :; do 2340a8ac8fSEnji Cooper mkdir ${n0}/${i} >/dev/null 2>&1 2440a8ac8fSEnji Cooper if [ $? -ne 0 ]; then 2540a8ac8fSEnji Cooper break 2640a8ac8fSEnji Cooper fi 2740a8ac8fSEnji Cooper i=`expr $i + 1` 2840a8ac8fSEnji Cooperdone 2940a8ac8fSEnji Cooperexpect ENOSPC mkdir ${n0}/${n1} 0755 3040a8ac8fSEnji Cooperumount /dev/md${n} 314ba73429SEnji Coopermdconfig -d -u ${n} || exit 3240a8ac8fSEnji Cooperexpect 0 rmdir ${n0} 33