mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Integrate dmapi suite 1 into xfsqa infrastructure
Merge of master-melb:xfs-cmds:27924a by kenmcd. added IRIX to _supported_os
This commit is contained in:
@@ -30,7 +30,7 @@ _cleanup()
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
|
||||
@@ -30,7 +30,7 @@ _cleanup()
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
|
||||
@@ -30,7 +30,7 @@ _cleanup()
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
@@ -39,7 +39,7 @@ _dmapi_scratch_mount
|
||||
mkdir -p $SCRATCH_MNT/dmapi
|
||||
|
||||
# run DMAPI test using verbose output
|
||||
${DMAPI_QASUITE2_DIR}src/test_fileattr -v $DMAPI_LS_TO_COPY_PATH $SCRATCH_MNT
|
||||
${DMAPI_QASUITE2_DIR}src/test_fileattr -v $DMAPI_LS_TO_COPY_PATH $SCRATCH_MNT 2>&1 | $PERL_PROG -ne 's/\d+\sloops/NUM loops/g ; print;'
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -30,7 +30,7 @@ _cleanup()
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
|
||||
@@ -24,7 +24,9 @@ _cleanup()
|
||||
}
|
||||
|
||||
_report_filter () {
|
||||
perl -ne "s/Report: \"0x[0-f]+\" was written and \"0x[0-f]+\" was read at byte [0-9]+ million./Report: \"HEX\" was written and \"HEX\" was read at byte NUM million./g ; print"
|
||||
$PERL_PROG -ne "s/Report: \"0x[0-f]+\" was written and \"0x[0-f]+\" was read at/Report: \"HEX\" was written and \"HEX\" was read at/g ;
|
||||
s/byte [0-9]+ million./byte NUM million./g;
|
||||
print"
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
@@ -34,7 +36,10 @@ _report_filter () {
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
_supported_os Linux IRIX
|
||||
|
||||
# link correct .out file
|
||||
_link_out_file $seq.out
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
|
||||
+324
@@ -0,0 +1,324 @@
|
||||
QA output created by 146
|
||||
Invisible read/write tests beginning...
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.....
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..........
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...............
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
....................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.........................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
..............................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
...................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
........................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: time stamp unchanged by write
|
||||
.............................................
|
||||
Report: time stamp unchanged by read
|
||||
Report: "HEX" was written and "HEX" was read at byte NUM million.
|
||||
Report: "HEX" was written and "HEX" was read at 2147840000 bytes
|
||||
(a bit over 2 gigabytes).
|
||||
(errno subtests beginning...)
|
||||
report on test for EACCES in no-right write: test successful
|
||||
report on test for EACCES in SHARED write: test successful
|
||||
report on test for success in EXCL write: test successful.
|
||||
report on test for EBADF in write: test successful
|
||||
report on test for EBADF in read: test successful
|
||||
report on test for EBADF in write: test successful
|
||||
report on test for EFAULT in write: test successful
|
||||
report on test for EINVAL in (bad offset) write: test successful
|
||||
report on test for EINVAL in (bad sid) write: test successful
|
||||
report on test for EACCES in no-right read: test successful
|
||||
report on test for success in SHARED read: test successful.
|
||||
report on test for success in EXCL read: test successful.
|
||||
report on test for EBADF in read: test successful
|
||||
report on test for EFAULT in read: test successful
|
||||
report on test for EINVAL in (bad offset) read: test successful
|
||||
report on test for EINVAL in (bad sid) read: test successful
|
||||
(errno subtests complete!)
|
||||
Invisible read/write tests complete.
|
||||
@@ -30,7 +30,7 @@ _cleanup()
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
|
||||
@@ -77,7 +77,7 @@ else
|
||||
umount $SCRATCH_DEV
|
||||
fi
|
||||
clear=""
|
||||
eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne '
|
||||
eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | $PERL_PROG -ne '
|
||||
if (/byte offset (\d+), length (\d+)/) {
|
||||
print "clear=", $1 / 512, "\n"; exit
|
||||
}'`
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#! /bin/sh
|
||||
# FSQA Test No. 150
|
||||
#
|
||||
# Set DM_EVENT_RENAME event on a DMAPI filesystem and verify it is set.
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=allanr@sgi.com
|
||||
|
||||
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()
|
||||
{
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
_filter_fs_handle()
|
||||
{
|
||||
$SED_PROG -e "s/$DMAPI_FS_HANDLE/DMAPI_FS_HANDLE/g"
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
. ./common.dmapi
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_dmapi_scratch_mount
|
||||
|
||||
DMAPI_FS_HANDLE="`${DMAPI_QASUITE1_DIR}cmd/path_to_fshandle $SCRATCH_MNT`"
|
||||
|
||||
${DMAPI_QASUITE1_DIR}cmd/get_eventlist $DMAPI_FS_HANDLE \
|
||||
| _filter_fs_handle
|
||||
|
||||
${DMAPI_QASUITE1_DIR}cmd/set_eventlist $DMAPI_FS_HANDLE DM_EVENT_RENAME
|
||||
echo "set_eventlist Returned: $?"
|
||||
|
||||
${DMAPI_QASUITE1_DIR}cmd/get_eventlist $DMAPI_FS_HANDLE \
|
||||
| _filter_fs_handle
|
||||
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,5 @@
|
||||
QA output created by 150
|
||||
Events on object DMAPI_FS_HANDLE (0x0), nelemp 23:
|
||||
set_eventlist Returned: 0
|
||||
Events on object DMAPI_FS_HANDLE (0x400), nelemp 23:
|
||||
DM_EVENT_RENAME (10)
|
||||
@@ -0,0 +1,97 @@
|
||||
#! /bin/sh
|
||||
# FSQA Test No. 151
|
||||
#
|
||||
# Create three DMAPI sessions,
|
||||
# verify they have been created,
|
||||
# then distroy first session
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=allanr@sgi.com
|
||||
|
||||
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()
|
||||
{
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
_dm_create_session()
|
||||
{
|
||||
eval `${DMAPI_QASUITE1_DIR}../simple/dm_create_session`
|
||||
echo "RET=$ret NEWSID=NUM"
|
||||
}
|
||||
|
||||
_filter_sid_list()
|
||||
{
|
||||
$SED_PROG -e "s/sids=\"[0-9| ]*\"/sids=NUMS/"
|
||||
}
|
||||
|
||||
_check_sids()
|
||||
{
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_getall_sessions | grep "$@" > /dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "ERROR: SID(s) not created"
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_getall_sessions >>$seq.full
|
||||
fi
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
. ./common.dmapi
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_dmapi_scratch_mount
|
||||
|
||||
echo "*** create 3 sessions"
|
||||
_dm_create_session
|
||||
sid1=$newsid
|
||||
_dm_create_session
|
||||
sid2=$newsid
|
||||
_dm_create_session
|
||||
sid3=$newsid
|
||||
|
||||
echo "*** check 3 sessions exist"
|
||||
_check_sids "$sid1 $sid2 $sid3"
|
||||
|
||||
echo "*** destroy first session"
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid1
|
||||
|
||||
#should fail
|
||||
echo "*** check first session no longer exists"
|
||||
_check_sids "$sid1"
|
||||
|
||||
#should still remain
|
||||
echo "*** check last 2 session exist"
|
||||
_check_sids "$sid2 $sid3"
|
||||
|
||||
echo "*** query"
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_query_session -s $sid2
|
||||
|
||||
echo "*** remove remaining sessions"
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid2
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid3
|
||||
|
||||
echo "*** check second session no longer exists"
|
||||
_check_sids "$sid2"
|
||||
|
||||
echo "*** check third session no longer exists"
|
||||
_check_sids "$sid3"
|
||||
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,22 @@
|
||||
QA output created by 151
|
||||
*** create 3 sessions
|
||||
RET=0 NEWSID=NUM
|
||||
RET=0 NEWSID=NUM
|
||||
RET=0 NEWSID=NUM
|
||||
*** check 3 sessions exist
|
||||
*** destroy first session
|
||||
ret=0
|
||||
*** check first session no longer exists
|
||||
ERROR: SID(s) not created
|
||||
*** check last 2 session exist
|
||||
*** query
|
||||
ret=0
|
||||
rlen=6
|
||||
sessinfo=test1
|
||||
*** remove remaining sessions
|
||||
ret=0
|
||||
ret=0
|
||||
*** check second session no longer exists
|
||||
ERROR: SID(s) not created
|
||||
*** check third session no longer exists
|
||||
ERROR: SID(s) not created
|
||||
@@ -0,0 +1,50 @@
|
||||
#! /bin/sh
|
||||
# FSQA Test No. 152
|
||||
#
|
||||
# Verify DMAPI functions
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=allanr@sgi.com
|
||||
|
||||
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()
|
||||
{
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
_filter_handles()
|
||||
{
|
||||
$PERL_PROG -ne "s/[0-9|a-f]+\s+\(dm/DMAPI_HANDLE \(dm/g ; print" |
|
||||
$PERL_PROG -ne "s/hash [0-9]+/hash HASH/g; print"
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
. ./common.dmapi
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_dmapi_scratch_mount
|
||||
|
||||
DMAPI_FS_HANDLE="`${DMAPI_QASUITE1_DIR}cmd/path_to_fshandle $SCRATCH_MNT`"
|
||||
|
||||
${DMAPI_QASUITE1_DIR}cmd/dm_handle $SCRATCH_MNT | _filter_handles
|
||||
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,10 @@
|
||||
QA output created by 152
|
||||
han1: hash HASH value DMAPI_HANDLE (dm_path_to_handle)
|
||||
fshan1: hash HASH value DMAPI_HANDLE (dm_path_to_fshandle
|
||||
han2: hash HASH value DMAPI_HANDLE (dm_fd_to_handle)
|
||||
fshan2: hash HASH value DMAPI_HANDLE (dm_handle_to_fshandle)
|
||||
fsid DMAPI_HANDLE (dm_handle_to_fsid)
|
||||
ino DMAPI_HANDLE (dm_handle_to_ino)
|
||||
igen DMAPI_HANDLE (dm_handle_to_igen)
|
||||
han3: hash HASH value DMAPI_HANDLE (dm_make_handle)
|
||||
fshan3: hash HASH value DMAPI_HANDLE (dm_make_fshandle)
|
||||
@@ -0,0 +1,57 @@
|
||||
#! /bin/sh
|
||||
# FSQA Test No. 153
|
||||
#
|
||||
# Associate filesystem with a session by setting DMAPI DM_EVENT_RENAME
|
||||
# disposition.
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=allanr@sgi.com
|
||||
|
||||
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()
|
||||
{
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
. ./common.dmapi
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_dmapi_scratch_mount
|
||||
|
||||
DMAPI_FS_HANDLE="`${DMAPI_QASUITE1_DIR}cmd/path_to_fshandle $SCRATCH_MNT`"
|
||||
|
||||
echo "*** create DMAPI sessions"
|
||||
eval `${DMAPI_QASUITE1_DIR}../simple/dm_create_session`
|
||||
sid1=$newsid
|
||||
eval `${DMAPI_QASUITE1_DIR}../simple/dm_create_session`
|
||||
sid2=$newsid
|
||||
|
||||
${DMAPI_QASUITE1_DIR}cmd/set_disp -s $sid1 $DMAPI_FS_HANDLE DM_EVENT_RENAME
|
||||
${DMAPI_QASUITE1_DIR}cmd/getall_disp $sid1 | $PERL_PROG -ne "s/fshandle\s+[0-9|a-f]+/fshandle FS_HANDLE/; print"
|
||||
${DMAPI_QASUITE1_DIR}cmd/getall_disp $sid2
|
||||
|
||||
echo "*** destroy DMAPI sessions"
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid1
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid2
|
||||
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,8 @@
|
||||
QA output created by 153
|
||||
*** create DMAPI sessions
|
||||
rlenp is 32
|
||||
fshandle FS_HANDLE dm_eventset_t 02000
|
||||
rlenp is 0
|
||||
*** destroy DMAPI sessions
|
||||
ret=0
|
||||
ret=0
|
||||
@@ -0,0 +1,44 @@
|
||||
#! /bin/sh
|
||||
# FSQA Test No. 154
|
||||
#
|
||||
# Get DMAPI filesystem handle
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=allanr@sgi.com
|
||||
|
||||
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()
|
||||
{
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
. ./common.dmapi
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_dmapi_scratch_mount
|
||||
|
||||
DMAPI_FS_HANDLE="`${DMAPI_QASUITE1_DIR}cmd/path_to_fshandle $SCRATCH_MNT`"
|
||||
|
||||
${DMAPI_QASUITE1_DIR}cmd/get_config_events $DMAPI_FS_HANDLE
|
||||
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,21 @@
|
||||
QA output created by 154
|
||||
Events supported (0x3fffae), nelemp 23:
|
||||
DM_EVENT_MOUNT (1)
|
||||
DM_EVENT_PREUNMOUNT (2)
|
||||
DM_EVENT_UNMOUNT (3)
|
||||
DM_EVENT_CREATE (5)
|
||||
DM_EVENT_POSTCREATE (7)
|
||||
DM_EVENT_REMOVE (8)
|
||||
DM_EVENT_POSTREMOVE (9)
|
||||
DM_EVENT_RENAME (10)
|
||||
DM_EVENT_POSTRENAME (11)
|
||||
DM_EVENT_LINK (12)
|
||||
DM_EVENT_POSTLINK (13)
|
||||
DM_EVENT_SYMLINK (14)
|
||||
DM_EVENT_POSTSYMLINK (15)
|
||||
DM_EVENT_READ (16)
|
||||
DM_EVENT_WRITE (17)
|
||||
DM_EVENT_TRUNCATE (18)
|
||||
DM_EVENT_ATTRIBUTE (19)
|
||||
DM_EVENT_DESTROY (20)
|
||||
DM_EVENT_NOSPACE (21)
|
||||
@@ -0,0 +1,76 @@
|
||||
#! /bin/sh
|
||||
# FSQA Test No. 155
|
||||
#
|
||||
# DMAPI event DM_EVENT_RENAME generation
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=allanr@sgi.com
|
||||
|
||||
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()
|
||||
{
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
. ./common.dmapi
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_dmapi_scratch_mount
|
||||
|
||||
DMAPI_FS_HANDLE="`${DMAPI_QASUITE1_DIR}cmd/path_to_fshandle $SCRATCH_MNT`"
|
||||
|
||||
rm -f $SCRATCH_MNT/dmapi_test_file1
|
||||
|
||||
echo "*** create DMAPI session"
|
||||
eval `${DMAPI_QASUITE1_DIR}../simple/dm_create_session`
|
||||
sid1=$newsid
|
||||
|
||||
${DMAPI_QASUITE1_DIR}cmd/set_eventlist $DMAPI_FS_HANDLE DM_EVENT_RENAME
|
||||
echo "set_eventlist Returned: $?"
|
||||
|
||||
echo "*** setting DMAPI DM_EVENT_RENAME disposition."
|
||||
${DMAPI_QASUITE1_DIR}cmd/set_disp -s $sid1 $DMAPI_FS_HANDLE DM_EVENT_RENAME
|
||||
|
||||
echo "***creating file on dmapi filesystem"
|
||||
touch $SCRATCH_MNT/dmapi_test_file
|
||||
|
||||
echo "***renameing file on dmapi filesystem"
|
||||
mv $SCRATCH_MNT/dmapi_test_file $SCRATCH_MNT/dmapi_test_file1 &
|
||||
MV_PID=$!
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "***checking for dmapi event"
|
||||
eval `${DMAPI_QASUITE1_DIR}cmd/get_events $sid1 \
|
||||
| $PERL_PROG -ne 's/new parent/new_parent/g;
|
||||
s/old parent/old_parent/g;
|
||||
s/new name/new_name/g;
|
||||
s/old name/old_name/g;
|
||||
s/\s+/\n/g;
|
||||
print;'`
|
||||
|
||||
${DMAPI_QASUITE1_DIR}cmd/respond_event $sid1 $token 1 0
|
||||
|
||||
${DMAPI_QASUITE1_DIR}../simple/dm_destroy_session -s $sid1
|
||||
|
||||
status=0
|
||||
exit
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user