4 # Create DMAPI event and respond to it.
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # get standard environment, filters and checks
31 # real QA test starts here
33 _supported_os Linux IRIX
36 _scratch_mkfs_xfs >/dev/null 2>&1
39 echo "***create session"
40 eval `${DMAPI_QASUITE1_DIR}../simple/dm_create_session`
42 echo "***create user event"
43 token="`${DMAPI_QASUITE1_DIR}cmd/create_userevent -s $newsid TEST_USER_EVENT | perl -ne 'if (/token ([0-9]+)/) { print $1; } '`"
44 [ $? -ne 0 ] && echo "failed to create user event"
46 echo "***respond to user event"
47 ${DMAPI_QASUITE1_DIR}cmd/respond_event $newsid $token 1 0
48 [ $? -ne 0 ] && echo "1st respond_event failed."
50 #already responded should fail
51 ${DMAPI_QASUITE1_DIR}cmd/respond_event $newsid $token 1 0 2>/dev/null
52 [ $? -eq 0 ] && echo "2nd respond_event didn't fail."
54 ${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $newsid