For XFSQA test 018 081 082 095 the test specifies test wide mkfs options using MKFS_O...
[xfstests-dev.git] / 153
1 #! /bin/sh
2 # FSQA Test No. 153
3 #
4 # Associate filesystem with a session by setting DMAPI DM_EVENT_RENAME
5 # disposition.
6 #
7 #-----------------------------------------------------------------------
8 #  Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
9 #-----------------------------------------------------------------------
10 #
11 # creator
12 owner=allanr@sgi.com
13
14 seq=`basename $0`
15 echo "QA output created by $seq"
16
17 here=`pwd`
18 tmp=/tmp/$$
19 status=1    # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
21
22 _cleanup()
23 {
24     _cleanup_testdir
25 }
26
27 # get standard environment, filters and checks
28 . ./common.rc
29 . ./common.filter
30 . ./common.dmapi
31
32 # real QA test starts here
33 _supported_fs xfs
34 _supported_os Linux IRIX
35
36 _require_scratch
37 _scratch_mkfs_xfs >/dev/null 2>&1
38 _dmapi_scratch_mount
39
40 DMAPI_FS_HANDLE="`${DMAPI_QASUITE1_DIR}cmd/path_to_fshandle $SCRATCH_MNT`"
41
42 echo "*** create DMAPI sessions"
43 eval `${DMAPI_QASUITE1_DIR}../simple/dm_create_session`
44 sid1=$newsid
45 eval `${DMAPI_QASUITE1_DIR}../simple/dm_create_session`
46 sid2=$newsid
47
48 ${DMAPI_QASUITE1_DIR}cmd/set_disp -s $sid1 $DMAPI_FS_HANDLE DM_EVENT_RENAME
49 ${DMAPI_QASUITE1_DIR}cmd/getall_disp $sid1 | $PERL_PROG -ne "s/fshandle\s+[0-9|a-f]+/fshandle FS_HANDLE/; print"
50 ${DMAPI_QASUITE1_DIR}cmd/getall_disp $sid2
51
52 echo "*** destroy DMAPI sessions"
53 ${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid1
54 ${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid2
55
56 status=0
57 exit