1#!/bin/sh 2# $FreeBSD: src/tools/regression/fstest/tests/link/15.t,v 1.1 2007/01/17 01:42:09 pjd Exp $ 3 4desc="link returns ENOSPC if the directory in which the entry for the new link is being placed cannot be extended because there is no space left on the file system containing the directory" 5 6n0=`namegen` 7n1=`namegen` 8n2=`namegen` 9 10expect 0 mkdir ${n0} 0755 11dd if=/dev/zero of=tmpdisk bs=1k count=256 status=none 12vnconfig vnd1 tmpdisk 13newfs /dev/rvnd1c >/dev/null 14mount /dev/vnd1c ${n0} 15expect 0 create ${n0}/${n1} 0644 16i=0 17while :; do 18 ln ${n0}/${n1} ${n0}/${i} 2>/dev/null 19 if [ $? -ne 0 ]; then 20 break 21 fi 22 i=$((i + 1)) 23done 24expect ENOSPC link ${n0}/${n1} ${n0}/${n2} 25umount /dev/vnd1c 26vnconfig -u vnd1 27rm tmpdisk 28expect 0 rmdir ${n0} 29