From: fsgqa Date: Mon, 14 Jul 2003 05:12:23 +0000 (+0000) Subject: Crank up fsstress a whole lot, enable unwritten extents everywhere, remove need for... X-Git-Tag: v1.1.0~962 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=72f0ade93dc4874ab6da29caa1667a0f527e1f8f;p=users%2Fhch%2Fxfstests-dev.git Crank up fsstress a whole lot, enable unwritten extents everywhere, remove need for special getpagesize program --- diff --git a/008 b/008 index ee6a169f9..fae262468 100755 --- a/008 +++ b/008 @@ -44,7 +44,7 @@ echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ status=0 # success is the default! -pgsize=`$here/src/getpagesize` +pgsize=`$here/src/feature -p` trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15 _cleanup() diff --git a/013 b/013 index 841b003e2..e5a8be8f1 100755 --- a/013 +++ b/013 @@ -1,5 +1,6 @@ #! /bin/sh # XFS QA Test No. 013 +# $Id: 1.1 $ # # fsstress # @@ -85,7 +86,7 @@ _do_test() echo "fsstress.$_n : $_param" echo "-----------------------------------------------" # -v >$tmp.out - if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -n $_count -d $out >/dev/null 2>&1 + if ! $here/src/fsstress $_param $FSSTRESS_AVOID -n $_count -d $out >/dev/null 2>&1 then echo " fsstress (count=$_count) returned $? - see $seq.full" @@ -96,7 +97,7 @@ _do_test() #cat $tmp.out >>$here/$seq.full status=1 fi - + _check_test_fs } @@ -106,7 +107,8 @@ _do_test() rm -f $here/$seq.full echo "brevity is wit..." -count=1000 +count=2000 +procs=20 _check_test_fs @@ -116,7 +118,7 @@ _do_test 1 "-r" $count # and the default with multiprocess -_do_test 2 "-p 5 -r" $count +_do_test 2 "-p $procs -r" $count # from Glen's notes diff --git a/013.out b/013.out index 52bf03914..127cc8684 100644 --- a/013.out +++ b/013.out @@ -6,7 +6,7 @@ fsstress.1 : -r ----------------------------------------------- ----------------------------------------------- -fsstress.2 : -p 5 -r +fsstress.2 : -p 20 -r ----------------------------------------------- ----------------------------------------------- diff --git a/073 b/073 new file mode 100755 index 000000000..87d4c738e --- /dev/null +++ b/073 @@ -0,0 +1,65 @@ +#! /bin/sh +# XFS QA Test No. 073 +# $Id: 073,v 1.1 2003/07/14 05:12:23 fsgqa Exp $ +# +# Test xfs_copy +# +#----------------------------------------------------------------------- +# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Further, this software is distributed without any warranty that it is +# free of the rightful claim of any third person regarding infringement +# or the like. Any license provided herein, whether implied or +# otherwise, applies only to this software file. Patent licenses, if +# any, provided herein do not apply to combinations of this program with +# other software, or any other product whatsoever. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write the Free Software Foundation, Inc., 59 +# Temple Place - Suite 330, Boston MA 02111-1307, USA. +# +# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, +# Mountain View, CA 94043, or: +# +# http://www.sgi.com +# +# For further information regarding this notice, see: +# +# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ +#----------------------------------------------------------------------- +# +# creator +owner=harshula@melbourne.sgi.com + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here + +# if error +exit + +# optional stuff if your test has verbose output to help resolve problems +#echo +#echo "If failure, check $seq.full (this) and $seq.full.ok (reference)" + +# success, all done +status=0 +exit diff --git a/common.rc b/common.rc index 5d248de18..0d4322fdf 100644 --- a/common.rc +++ b/common.rc @@ -46,7 +46,7 @@ umask 022 AWK_PROG=awk # extra parameters for fsstress -FSSTRESS_AVOID="-f resvsp=0 -f unresvsp=0" +FSSTRESS_AVOID= export AWK_PROG FSSTRESS_AVOID diff --git a/src/feature.c b/src/feature.c index 57b3a2f92..e89f34139 100644 --- a/src/feature.c +++ b/src/feature.c @@ -40,6 +40,10 @@ * -U test for user quota accounting support (mount option) * -G test for group quota accounting support (mount option) * Return code: 0 is true, anything else is error/not supported + * + * Test for machine features + * -p report pagesize + * -w report bits per long */ #include @@ -171,12 +175,14 @@ main(int argc, char **argv) int tflag = 0; int gflag = 0; int Gflag = 0; + int pflag = 0; int qflag = 0; int uflag = 0; int Uflag = 0; - char *fs; + int wflag = 0; + char *fs = NULL; - while ((c = getopt(argc, argv, "ctgGquUv")) != EOF) { + while ((c = getopt(argc, argv, "ctgGpquUvw")) != EOF) { switch (c) { case 'c': cflag++; @@ -190,6 +196,9 @@ main(int argc, char **argv) case 'G': Gflag++; break; + case 'p': + pflag++; + break; case 'q': qflag++; break; @@ -199,6 +208,9 @@ main(int argc, char **argv) case 'U': Uflag++; break; + case 'w': + wflag++; + break; case 'v': verbose++; break; @@ -207,11 +219,16 @@ main(int argc, char **argv) } } - if (!cflag && !tflag && !uflag && !gflag && !qflag && !Uflag && !Gflag) - usage(); - if (optind != argc-1) + /* filesystem features */ + if (cflag || tflag || uflag || gflag || qflag || Uflag || Gflag) { + if (optind != argc-1) /* need a device */ + usage(); + fs = argv[argc-1]; + } else if (wflag || pflag) { + if (optind != argc) + usage(); + } else usage(); - fs = argv[argc-1]; if (cflag) return(haschown32(fs)); @@ -228,6 +245,15 @@ main(int argc, char **argv) if (Uflag) return(hasxfsquota(USRQUOTA, XFS_QUOTA_UDQ_ACCT, fs)); - fprintf(stderr, "feature: dunno what you're doing?\n"); + if (pflag) { + printf("%d\n", getpagesize()); + exit(0); + } + if (wflag) { + printf("%d\n", BITS_PER_LONG); + exit(0); + } + + fprintf(stderr, "feature: dunno what you're after.\n"); return(1); }