4 # Create three DMAPI sessions,
5 # verify they have been created,
6 # then distroy first session
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
10 #-----------------------------------------------------------------------
16 echo "QA output created by $seq"
20 status=1 # failure is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
30 eval `${DMAPI_QASUITE1_DIR}../simple/dm_create_session`
31 echo "RET=$ret NEWSID=NUM"
36 $SED_PROG -e "s/sids=\"[0-9| ]*\"/sids=NUMS/"
41 ${DMAPI_QASUITE1_DIR}../simple/dm_getall_sessions | grep "$@" > /dev/null
42 if [ $? -ne 0 ] ; then
43 echo "ERROR: SID(s) not created"
44 ${DMAPI_QASUITE1_DIR}../simple/dm_getall_sessions >>$seq.full
48 # get standard environment, filters and checks
53 # real QA test starts here
55 _supported_os Linux IRIX
58 _scratch_mkfs_xfs >/dev/null 2>&1
61 echo "*** create 3 sessions"
69 echo "*** check 3 sessions exist"
70 _check_sids "$sid1 $sid2 $sid3"
72 echo "*** destroy first session"
73 ${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid1
76 echo "*** check first session no longer exists"
80 echo "*** check last 2 session exist"
81 _check_sids "$sid2 $sid3"
84 ${DMAPI_QASUITE1_DIR}../simple/dm_query_session -s $sid2
86 echo "*** remove remaining sessions"
87 ${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid2
88 ${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid3
90 echo "*** check second session no longer exists"
93 echo "*** check third session no longer exists"