blob: 549ab0b9548b00d5bd5ee8bfe2bc99460819ad3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
# $FreeBSD: src/tools/regression/fstest/tests/mkfifo/11.t,v 1.1 2007/01/17 01:42:09 pjd Exp $
desc="mkfifo returns ENOSPC if there are no free inodes on the file system on which the file is being created"
n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=256 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
mkfifo ${n0}/${i} 2>/dev/null
if [ $? -ne 0 ]; then
break
fi
i=`expr $i + 1`
done
expect ENOSPC mkfifo ${n0}/${n1} 0644
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}
|