1#!/bin/sh 2# $FreeBSD: src/tools/regression/fstest/tests/truncate/12.t,v 1.1 2007/01/17 01:42:12 pjd Exp $ 3 4desc="truncate returns EFBIG or EINVAL if the length argument was greater than the maximum file size" 5 6n0=`namegen` 7 8expect 0 create ${n0} 0644 9r=`${FSTEST} truncate ${n0} 999999999999999 2>/dev/null` 10case "${r}" in 11EFBIG|EINVAL) 12 expect 0 stat ${n0} size 13 ;; 140) 15 expect 999999999999999 stat ${n0} size 16 ;; 17*) 18 echo "not ok ${ntest}" 19 ntest=`expr ${ntest} + 1` 20 ;; 21esac 22expect 0 unlink ${n0} 23