ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/vendor/pjdfstest/0.1/tests/ftruncate/12.t
Revision: 11157
Committed: Wed Jun 27 12:56:13 2018 UTC (5 years, 10 months ago) by laffer1
Content type: application/x-troff
File size: 552 byte(s)
Log Message:
import pjdfstest 0.1

File Contents

# Content
1 #!/bin/sh
2 # $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/12.t 211352 2010-08-15 21:24:17Z pjd $
3
4 desc="truncate returns EFBIG or EINVAL if the length argument was greater than the maximum file size"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..3"
10
11 n0=`namegen`
12
13 expect 0 create ${n0} 0644
14 r=`${fstest} truncate ${n0} 999999999999999 2>/dev/null`
15 case "${r}" in
16 EFBIG|EINVAL)
17 expect 0 stat ${n0} size
18 ;;
19 0)
20 expect 999999999999999 stat ${n0} size
21 ;;
22 *)
23 echo "not ok ${ntest}"
24 ntest=`expr ${ntest} + 1`
25 ;;
26 esac
27 expect 0 unlink ${n0}