Add the new tests and their golden outputs.

Merge of master-melb:xfs-cmds:29445a by kenmcd.

  New Test
This commit is contained in:
Mohamed Barwani
2007-08-21 04:03:50 +00:00
parent 53a2bd6253
commit 7ff104a124
5 changed files with 297 additions and 0 deletions
Executable
+52
View File
@@ -0,0 +1,52 @@
#! /bin/sh
# FSQA Test No. 175
#
# Hole punching with extsize hints, holes may not reported by xfs_bmap.
# This is not good for certain backup apps, as they rely on the hole
# being visible in the file so later on they know where to migrate
# back the data from the tape.
#
#-----------------------------------------------------------------------
# Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
#-----------------------------------------------------------------------
#
owner=ddiss@sgi.com
seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
rm -f $seq.full
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
rm -f $tmp/*
}
# get standard environment, filters and checks
. ./common.rc
. ./common.filter
. ./common.punch
# real QA test starts here
_supported_fs xfs
_supported_os Linux
_require_scratch
# _test_punch args: blksize extsize_hint filesize "pp1 pp2 pp3" \
# "ps1 ps2 ps3" "pt1 pt2 pt3" "wp1 wp2" "ws1 ws2" \
# "w p p w p" resvsp
echo "-- test dmpunch-hole without an extent size hint --"
_test_punch 4096 0 256 "240" "16" "d" "0" "256" "w p" noresv
echo
echo "-- this time use a 4k (one block) extent size hint --"
_test_punch 4096 1 256 "240" "16" "d" "0" "256" "w p" noresv
status=0
exit
+63
View File
@@ -0,0 +1,63 @@
QA output created by 175
-- test dmpunch-hole without an extent size hint --
# testing 4096 0 256 240 16 d 0 256 w p noresv ...
+ mounting with dmapi enabled
# spawning test file with 4096 256 0 punch_test_file noresv
[0] punch_test_file
+ not using resvsp at file creation
# writing with 4096 0 256 punch_test_file
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..2047]: 96..2143 0 (96..2143) 2048 00000
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
# punching with 4096 240 16 d punch_test_file
+ hole punch using dmapi punch_hole
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..1919]: 96..2015 0 (96..2015) 1920 00000
1: [1920..2047]: hole 128
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
-- this time use a 4k (one block) extent size hint --
# testing 4096 1 256 240 16 d 0 256 w p noresv ...
+ mounting with dmapi enabled
# spawning test file with 4096 256 1 punch_test_file noresv
+ setting extent size hint to 4096
[4096] punch_test_file
+ not using resvsp at file creation
# writing with 4096 0 256 punch_test_file
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..2047]: 96..2143 0 (96..2143) 2048 00000
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
# punching with 4096 240 16 d punch_test_file
+ hole punch using dmapi punch_hole
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..1919]: 96..2015 0 (96..2015) 1920 00000
1: [1920..2047]: hole 128
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
Executable
+59
View File
@@ -0,0 +1,59 @@
#! /bin/sh
# FSQA Test No. 176
#
# Check if resvsp on file create effects bmap output after hole punch.
# 967674: hole not show when file is created with resvsp
#
#-----------------------------------------------------------------------
# Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
#-----------------------------------------------------------------------
#
owner=ddiss@sgi.com
seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
rm -f $seq.full
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
rm -f $tmp/*
}
# get standard environment, filters and checks
. ./common.rc
. ./common.filter
. ./common.punch
# real QA test starts here
_supported_fs xfs
_supported_os Linux
_require_scratch
# _test_punch args: blksize extsize_hint filesize "pp1 pp2 pp3" \
# "ps1 ps2 ps3" "pt1 pt2 pt3" "wp1 wp2" "ws1 ws2" \
# "w p p w p" resvsp
echo "-- test dmpunch-hole with resvsp on file create --"
_test_punch 4096 0 256 "240" "16" "d" "0" "256" "w p"
echo
echo "-- this time dont use resvsp --"
_test_punch 4096 0 256 "240" "16" "d" "0" "256" "w p" noresv
echo
echo
echo "-- test unresvsp hole punch with resvsp on file create --"
_test_punch 4096 0 256 "240" "16" "u" "0" "256" "w p"
echo
echo "-- this time dont use resvsp --"
_test_punch 4096 0 256 "240" "16" "u" "0" "256" "w p" noresv
status=0
exit
+121
View File
@@ -0,0 +1,121 @@
QA output created by 176
-- test dmpunch-hole with resvsp on file create --
# testing 4096 0 256 240 16 d 0 256 w p ...
+ mounting with dmapi enabled
# spawning test file with 4096 256 0 punch_test_file
[0] punch_test_file
# writing with 4096 0 256 punch_test_file
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..2047]: 96..2143 0 (96..2143) 2048 00000
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
# punching with 4096 240 16 d punch_test_file
+ hole punch using dmapi punch_hole
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..1919]: 96..2015 0 (96..2015) 1920 00000
1: [1920..2047]: hole 128
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
-- this time dont use resvsp --
# testing 4096 0 256 240 16 d 0 256 w p noresv ...
+ mounting with dmapi enabled
# spawning test file with 4096 256 0 punch_test_file noresv
[0] punch_test_file
+ not using resvsp at file creation
# writing with 4096 0 256 punch_test_file
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..2047]: 96..2143 0 (96..2143) 2048 00000
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
# punching with 4096 240 16 d punch_test_file
+ hole punch using dmapi punch_hole
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..1919]: 96..2015 0 (96..2015) 1920 00000
1: [1920..2047]: hole 128
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
-- test unresvsp hole punch with resvsp on file create --
# testing 4096 0 256 240 16 u 0 256 w p ...
# spawning test file with 4096 256 0 punch_test_file
[0] punch_test_file
# writing with 4096 0 256 punch_test_file
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..2047]: 96..2143 0 (96..2143) 2048 00000
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
# punching with 4096 240 16 u punch_test_file
+ hole punch using unresvsp
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..1919]: 96..2015 0 (96..2015) 1920 00000
1: [1920..2047]: hole 128
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
-- this time dont use resvsp --
# testing 4096 0 256 240 16 u 0 256 w p noresv ...
# spawning test file with 4096 256 0 punch_test_file noresv
[0] punch_test_file
+ not using resvsp at file creation
# writing with 4096 0 256 punch_test_file
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..2047]: 96..2143 0 (96..2143) 2048 00000
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
# punching with 4096 240 16 u punch_test_file
+ hole punch using unresvsp
# showing file state punch_test_file
punch_test_file:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..1919]: 96..2015 0 (96..2015) 1920 00000
1: [1920..2047]: hole 128
FLAG Values:
010000 Unwritten preallocated extent
001000 Doesn't begin on stripe unit
000100 Doesn't end on stripe unit
000010 Doesn't begin on stripe width
000001 Doesn't end on stripe width
+2
View File
@@ -262,6 +262,8 @@ filestreams dgc@sgi.com
172 rw filestreams auto
173 rw filestreams auto
174 rw filestreams auto
175 dmapi auto
176 dmapi auto
177 rw other auto
178 mkfs other auto
179 metadata rw auto