fix XFSQA 145 / test_hole
[xfstests-dev.git] / common.dmapi
1 ##/bin/sh
2 #
3 # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # dmapi functions
6 #
7
8 # Commands relitive to dmapi qa
9
10 DMAPI_QASUITE1_DIR=$here/dmapi/src/suite1/
11 DMAPI_QASUITE2_DIR=$here/dmapi/src/suite2/
12 DMAPI_COMMON_DIR=$here/dmapi/src/common/
13
14 DMAPI_LS_TO_COPY_PATH=$DMAPI_QASUITE2_DIR/bindir/ls_to_copy
15
16 _dmapi_scratch_mount () {
17     if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
18         `echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
19         #already got dmapi options set
20         _scratch_mount
21         dmapi_mount_result=$?
22     else
23         _scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
24         dmapi_mount_result=$?
25     fi
26
27     if [ $dmapi_mount_result -ne 0 ] ; then
28         _notrun "Assuming DMAPI modules are not loaded"
29     fi
30 }
31
32