2001-01-15 05:01:19 +00:00
|
|
|
#! /bin/sh
|
2004-06-15 07:32:36 +00:00
|
|
|
# FS QA Test No. 034
|
2001-01-15 05:01:19 +00:00
|
|
|
#
|
2003-05-19 04:56:35 +00:00
|
|
|
# pv 801241 - check for reference leaks from the *handle xfsctls
|
2001-01-15 05:01:19 +00:00
|
|
|
#
|
|
|
|
|
#-----------------------------------------------------------------------
|
2002-06-04 23:07:56 +00:00
|
|
|
# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
|
2001-01-15 05:01:19 +00:00
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# creator
|
2003-06-24 06:21:22 +00:00
|
|
|
owner=dxm@sgi.com
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
seq=`basename $0`
|
|
|
|
|
echo "QA output created by $seq"
|
|
|
|
|
|
|
|
|
|
here=`pwd`
|
|
|
|
|
tmp=/tmp/$$
|
|
|
|
|
status=1 # failure is the default!
|
|
|
|
|
|
|
|
|
|
_cleanup()
|
|
|
|
|
{
|
2004-06-15 07:32:36 +00:00
|
|
|
cd /
|
|
|
|
|
rm -f $tmp.*
|
2001-01-15 05:01:19 +00:00
|
|
|
echo "*** unmount"
|
|
|
|
|
umount $SCRATCH_MNT 2>/dev/null
|
|
|
|
|
}
|
2004-06-15 07:32:36 +00:00
|
|
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
# get standard environment, filters and checks
|
|
|
|
|
. ./common.rc
|
|
|
|
|
. ./common.filter
|
|
|
|
|
|
|
|
|
|
# real QA test starts here
|
2004-06-15 07:32:36 +00:00
|
|
|
_supported_fs xfs
|
|
|
|
|
_supported_os Linux
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
_require_scratch
|
|
|
|
|
|
|
|
|
|
echo "*** init FS"
|
|
|
|
|
|
|
|
|
|
rm -f $seq.full
|
|
|
|
|
umount $SCRATCH_DEV >/dev/null 2>&1
|
|
|
|
|
echo "*** MKFS ***" >>$seq.full
|
|
|
|
|
echo "" >>$seq.full
|
2003-05-22 04:16:45 +00:00
|
|
|
_scratch_mkfs_xfs >>$seq.full 2>&1 \
|
2001-01-15 05:01:19 +00:00
|
|
|
|| _fail "mkfs failed"
|
2003-05-22 04:16:45 +00:00
|
|
|
_scratch_mount >>$seq.full 2>&1 \
|
2001-01-15 05:01:19 +00:00
|
|
|
|| _fail "mount failed"
|
|
|
|
|
|
|
|
|
|
echo "*** test"
|
|
|
|
|
|
2003-05-22 04:16:45 +00:00
|
|
|
_check_scratch_fs
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
if ! touch $SCRATCH_MNT/fish
|
|
|
|
|
then
|
|
|
|
|
echo "!!! failed to touch fish"
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
2004-02-13 04:31:25 +00:00
|
|
|
if ! src/xfsctl $SCRATCH_MNT $SCRATCH_MNT/fish >>$seq.full 2>&1
|
2001-01-15 05:01:19 +00:00
|
|
|
then
|
2003-05-19 04:56:35 +00:00
|
|
|
echo "!!! failed to run xfsctl test program"
|
2001-01-15 05:01:19 +00:00
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if ! rm $SCRATCH_MNT/fish
|
|
|
|
|
then
|
|
|
|
|
echo "!!! failed to remove fish"
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# pv 801241 causes corruption here (inode left in agi_unlinked list)
|
2003-05-22 04:16:45 +00:00
|
|
|
_check_scratch_fs
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
echo "*** done"
|
|
|
|
|
# happy exit
|
|
|
|
|
status=0
|
|
|
|
|
exit 0
|