4 # test out mkfs_xfs output on IRIX/Linux and some of its error handling
5 # ensure pv#920679 is addressed
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
10 # This program is free software; you can redistribute it and/or modify it
11 # under the terms of version 2 of the GNU General Public License as
12 # published by the Free Software Foundation.
14 # This program is distributed in the hope that it would be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 # Further, this software is distributed without any warranty that it is
19 # free of the rightful claim of any third person regarding infringement
20 # or the like. Any license provided herein, whether implied or
21 # otherwise, applies only to this software file. Patent licenses, if
22 # any, provided herein do not apply to combinations of this program with
23 # other software, or any other product whatsoever.
25 # You should have received a copy of the GNU General Public License along
26 # with this program; if not, write the Free Software Foundation, Inc., 59
27 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
29 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
30 # Mountain View, CA 94043, or:
34 # For further information regarding this notice, see:
36 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
37 #-----------------------------------------------------------------------
43 echo "QA output created by $seq"
47 status=1 # failure is the default!
48 trap "_cleanup; exit \$status" 0 1 2 3 15
56 # get standard environment, filters and checks
62 # filter out counts which will vary
63 # - blocks, agsize, agcount, device name
64 # filter out differences between linux and irix:
66 # - mmr, mixed-case on IRIX
67 # - lazy-count on IRIX
68 # - inode-paths on IRIX
69 # - trailing spaces on Linux but not on IRIX
75 -e 's/blocks=[0-9][0-9]*/blocks=N/' \
76 -e 's/agsize=[0-9][0-9]*/agsize=N/' \
77 -e 's/agcount=[0-9][0-9]*/agcount=N/' \
78 -e 's/meta-data=[^ ]*/meta-data=DEV/' \
79 -e 's/ *isize/ isize/' \
80 -e '/ *= *sectsz=[0-9][0-9]* *$/d' \
81 -e '/ *= *mmr=[0-9][0-9]* *$/d' \
82 -e 's/ *mixed-case=[YN]//' \
83 -e 's/sectsz=[0-9][0-9]* *//' \
84 -e 's/, lazy-count.*//' \
89 # real QA test starts here
92 # Modify as appropriate.
94 _supported_os IRIX Linux
98 # maximum log record size
99 max_lr_size=`expr 256 \* 1024`
101 big_su=`expr $max_lr_size + 4096`
104 # Test out various mkfs param combinations
106 cat >$tmp.seq.params <<EOF
107 # su too big but must be a multiple of fs block size too
108 -l version=2,su=`expr $max_lr_size + 512`
109 # test log stripe greater than LR size
110 -l version=2,su=$big_su
111 # same test but get log stripe from data stripe
112 -l version=2 -d su=$big_su,sw=1
113 # test out data stripe
115 # test out data stripe the same but using sunit & swidth
116 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
121 # call mkfs in a loop for various params
124 cat $tmp.seq.params \
127 if echo $mkfs | grep -q '^#'; then
128 # print out header & ignore comment
132 echo "--- mkfs=$mkfs ---"
133 export MKFS_OPTIONS="$mkfs"
134 _scratch_mkfs_xfs | _mkfs_filter