mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Crank up fsstress a whole lot, enable unwritten extents everywhere, remove need for special getpagesize program
This commit is contained in:
@@ -44,7 +44,7 @@ echo "QA output created by $seq"
|
|||||||
here=`pwd`
|
here=`pwd`
|
||||||
tmp=/tmp/$$
|
tmp=/tmp/$$
|
||||||
status=0 # success is the default!
|
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
|
trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
_cleanup()
|
_cleanup()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# XFS QA Test No. 013
|
# XFS QA Test No. 013
|
||||||
|
# $Id: 1.1 $
|
||||||
#
|
#
|
||||||
# fsstress
|
# fsstress
|
||||||
#
|
#
|
||||||
@@ -85,7 +86,7 @@ _do_test()
|
|||||||
echo "fsstress.$_n : $_param"
|
echo "fsstress.$_n : $_param"
|
||||||
echo "-----------------------------------------------"
|
echo "-----------------------------------------------"
|
||||||
# -v >$tmp.out
|
# -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
|
then
|
||||||
echo " fsstress (count=$_count) returned $? - see $seq.full"
|
echo " fsstress (count=$_count) returned $? - see $seq.full"
|
||||||
|
|
||||||
@@ -106,7 +107,8 @@ _do_test()
|
|||||||
rm -f $here/$seq.full
|
rm -f $here/$seq.full
|
||||||
echo "brevity is wit..."
|
echo "brevity is wit..."
|
||||||
|
|
||||||
count=1000
|
count=2000
|
||||||
|
procs=20
|
||||||
|
|
||||||
_check_test_fs
|
_check_test_fs
|
||||||
|
|
||||||
@@ -116,7 +118,7 @@ _do_test 1 "-r" $count
|
|||||||
|
|
||||||
# and the default with multiprocess
|
# and the default with multiprocess
|
||||||
|
|
||||||
_do_test 2 "-p 5 -r" $count
|
_do_test 2 "-p $procs -r" $count
|
||||||
|
|
||||||
# from Glen's notes
|
# from Glen's notes
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ fsstress.1 : -r
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
fsstress.2 : -p 5 -r
|
fsstress.2 : -p 20 -r
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -46,7 +46,7 @@ umask 022
|
|||||||
AWK_PROG=awk
|
AWK_PROG=awk
|
||||||
|
|
||||||
# extra parameters for fsstress
|
# extra parameters for fsstress
|
||||||
FSSTRESS_AVOID="-f resvsp=0 -f unresvsp=0"
|
FSSTRESS_AVOID=
|
||||||
|
|
||||||
export AWK_PROG FSSTRESS_AVOID
|
export AWK_PROG FSSTRESS_AVOID
|
||||||
|
|
||||||
|
|||||||
+32
-6
@@ -40,6 +40,10 @@
|
|||||||
* -U test for user quota accounting support (mount option)
|
* -U test for user quota accounting support (mount option)
|
||||||
* -G test for group 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
|
* Return code: 0 is true, anything else is error/not supported
|
||||||
|
*
|
||||||
|
* Test for machine features
|
||||||
|
* -p report pagesize
|
||||||
|
* -w report bits per long
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <xfs/libxfs.h>
|
#include <xfs/libxfs.h>
|
||||||
@@ -171,12 +175,14 @@ main(int argc, char **argv)
|
|||||||
int tflag = 0;
|
int tflag = 0;
|
||||||
int gflag = 0;
|
int gflag = 0;
|
||||||
int Gflag = 0;
|
int Gflag = 0;
|
||||||
|
int pflag = 0;
|
||||||
int qflag = 0;
|
int qflag = 0;
|
||||||
int uflag = 0;
|
int uflag = 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) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
cflag++;
|
cflag++;
|
||||||
@@ -190,6 +196,9 @@ main(int argc, char **argv)
|
|||||||
case 'G':
|
case 'G':
|
||||||
Gflag++;
|
Gflag++;
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
pflag++;
|
||||||
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
qflag++;
|
qflag++;
|
||||||
break;
|
break;
|
||||||
@@ -199,6 +208,9 @@ main(int argc, char **argv)
|
|||||||
case 'U':
|
case 'U':
|
||||||
Uflag++;
|
Uflag++;
|
||||||
break;
|
break;
|
||||||
|
case 'w':
|
||||||
|
wflag++;
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose++;
|
verbose++;
|
||||||
break;
|
break;
|
||||||
@@ -207,11 +219,16 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cflag && !tflag && !uflag && !gflag && !qflag && !Uflag && !Gflag)
|
/* filesystem features */
|
||||||
usage();
|
if (cflag || tflag || uflag || gflag || qflag || Uflag || Gflag) {
|
||||||
if (optind != argc-1)
|
if (optind != argc-1) /* need a device */
|
||||||
usage();
|
usage();
|
||||||
fs = argv[argc-1];
|
fs = argv[argc-1];
|
||||||
|
} else if (wflag || pflag) {
|
||||||
|
if (optind != argc)
|
||||||
|
usage();
|
||||||
|
} else
|
||||||
|
usage();
|
||||||
|
|
||||||
if (cflag)
|
if (cflag)
|
||||||
return(haschown32(fs));
|
return(haschown32(fs));
|
||||||
@@ -228,6 +245,15 @@ main(int argc, char **argv)
|
|||||||
if (Uflag)
|
if (Uflag)
|
||||||
return(hasxfsquota(USRQUOTA, XFS_QUOTA_UDQ_ACCT, fs));
|
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);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user