12.t revision 303975
157419Smarkm#!/bin/sh 257419Smarkm# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/12.t 211352 2010-08-15 21:24:17Z pjd $ 357419Smarkm 457419Smarkmdesc="truncate returns EFBIG or EINVAL if the length argument was greater than the maximum file size" 557419Smarkm 657419Smarkmdir=`dirname $0` 757419Smarkm. ${dir}/../misc.sh 857419Smarkm 957416Smarkmecho "1..3" 1057416Smarkm 1157416Smarkmn0=`namegen` 1257416Smarkm 1357416Smarkmexpect 0 create ${n0} 0644 1457416Smarkmr=`${fstest} truncate ${n0} 999999999999999 2>/dev/null` 1557416Smarkmcase "${r}" in 1657416SmarkmEFBIG|EINVAL) 1757416Smarkm expect 0 stat ${n0} size 1857416Smarkm ;; 1957416Smarkm0) 2057416Smarkm expect 999999999999999 stat ${n0} size 2157416Smarkm ;; 2257416Smarkm*) 2357416Smarkm echo "not ok ${ntest}" 2457416Smarkm ntest=`expr ${ntest} + 1` 2557416Smarkm ;; 2657416Smarkmesac 2757416Smarkmexpect 0 unlink ${n0} 2857416Smarkm