xfstests: added -P option to $DF_PROG

Added -P option to $DF_PROG and changed the invocation of
'df' command in generic/{251,260,273,275} testcases
with $DF_PROG.

Otherwise the testcases will fail if the scratch
device has a long name (for example, if it's an LVM volume).
Because df outputs its usage stats with two lines:

/dev/mapper/xfstests-disk1
                       3030800      4608   2868908   1% /tmp/mnt/disk1

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Stanislav Kholmanskikh
2013-10-29 09:25:24 +00:00
committed by Rich Johnston
parent efbdf561bd
commit bfdd1e72b3
5 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -69,14 +69,14 @@ sync
dd if=/dev/zero of=$SCRATCH_MNT/tmp4 bs=4K oflag=sync >>$seqres.full 2>&1
# Save space usage info to the full file
echo "Pre rm space:" >> $seqres.full
df $SCRATCH_MNT >>$seqres.full 2>&1
$DF_PROG $SCRATCH_MNT >>$seqres.full 2>&1
# Should leave approx 256k free
rm -f $SCRATCH_MNT/tmp1
sync
echo "Post rm space:" >> $seqres.full
df $SCRATCH_MNT >>$seqres.full 2>&1
_freespace=`df -k $SCRATCH_MNT | tail -n 1 | awk '{print $4}'`
$DF_PROG $SCRATCH_MNT >>$seqres.full 2>&1
_freespace=`$DF_PROG -k $SCRATCH_MNT | tail -n 1 | awk '{print $5}'`
[ $_freespace -gt 1024 ] && _fail "could not sufficiently fill filesystem"
# Try a write larger than available space