1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/mkdir/11.t 211352 2010-08-15 21:24:17Z pjd $ 3 4desc="mkdir returns ENOSPC if there are no free inodes on the file system on which the directory 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 mkdir ${n0}/${i} >/dev/null 2>&1 23 if [ $? -ne 0 ]; then 24 break 25 fi 26 i=`expr $i + 1` 27done 28expect ENOSPC mkdir ${n0}/${n1} 0755 29umount /dev/md${n} 30mdconfig -d -u ${n} || exit 31expect 0 rmdir ${n0} 32