From 7ff104a124c30e7e55f48fb441fd313dda82dd4c Mon Sep 17 00:00:00 2001 From: Mohamed Barwani Date: Tue, 21 Aug 2007 04:03:50 +0000 Subject: [PATCH] Add the new tests and their golden outputs. Merge of master-melb:xfs-cmds:29445a by kenmcd. New Test --- 175 | 52 ++++++++++++++++++++++++ 175.out | 63 +++++++++++++++++++++++++++++ 176 | 59 +++++++++++++++++++++++++++ 176.out | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ group | 2 + 5 files changed, 297 insertions(+) create mode 100755 175 create mode 100644 175.out create mode 100755 176 create mode 100644 176.out diff --git a/175 b/175 new file mode 100755 index 00000000..725436a8 --- /dev/null +++ b/175 @@ -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 diff --git a/175.out b/175.out new file mode 100644 index 00000000..cef9b75c --- /dev/null +++ b/175.out @@ -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 diff --git a/176 b/176 new file mode 100755 index 00000000..e5255edb --- /dev/null +++ b/176 @@ -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 diff --git a/176.out b/176.out new file mode 100644 index 00000000..d3b65256 --- /dev/null +++ b/176.out @@ -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 diff --git a/group b/group index 8330f64b..1ee502b8 100644 --- a/group +++ b/group @@ -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 -- 2.30.2