Skip to contentSkip to conversation

QA test for mounting with external log

DISCUSSION Eric Sandeen 1 participant 1 message May 19, 2008

lore
Share & tools
lore
#0 lore raw

This could probably use some cleanup but something like this would have caught that recent regression.

Thanks,
-Eric

#! /bin/sh
# FS QA Test No. 188
#
# Test mounting with a device-sized external log
#
#-----------------------------------------------------------------------
# Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
#-----------------------------------------------------------------------
#

# creator
[email protected]

seq=basename $0
echo "QA output created by $seq"

here=pwd
tmp=/tmp/$$
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15

_cleanup()
{
cd /
rm -f $tmp.*
losetup -d /dev/loop2
}

# get standard environment, filters and checks
. ./common.rc
. ./common.filter
rm -f $seq.full
# real QA test starts here

# Modify as appropriate.
_require_scratch
_supported_fs xfs
_supported_os Linux # (for losetup)

export MKFS_OPTIONS=""
export MOUNT_OPTIONS=""

dd if=/dev/zero bs=1M count=16 of=$tmp.logfile >/dev/null losetup /dev/loop2 $tmp.logfile
_scratch_mkfs -llogdev=/dev/loop2 >/dev/null 2>&1 _scratch_mount -o logdev=/dev/loop2
umount $SCRATCH_DEV

# success, all done
status=0
exit