All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch][xfstests-dev] 091: fix up output when pagesize == sectorsize
@ 2011-02-14 16:44 Jeff Moyer
  2011-02-16 10:45 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Moyer @ 2011-02-14 16:44 UTC (permalink / raw)
  To: xfs

Hi,

It looks like test 091 is supposed to work on 2.4 kernels, but there's
no way it will.  Checking the actual blocksize and pagesize in the
run_fsx routine, and substituting them for BSIZE and PSIZE is error
prone when the two hold the same value.  This is also a problem for 4k
sector devices.  It's better to pass in what we want (PSIZE or BSIZE)
and then convert that to the command line options that fsx wants in the
run_fsx routine.  This gets rid of the bogus test failure in my
environment.  Also, the setting of bsize for linux-2.6 was redundant, so
I got rid of it.  Comments are appreciated.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

diff --git a/091 b/091
index 6c4566f..a13d979 100755
--- a/091
+++ b/091
@@ -46,9 +46,10 @@ rm -f $seq.full
 
 run_fsx()
 {
-	echo fsx $@ | tee -a $seq.full | sed -e "s/ $bsize / BSIZE /g" -e "s/ $psize / PSIZE /g"
+	echo fsx $@ | tee -a $seq.full
+	args=`echo $@ | sed -e "s/ BSIZE / $bsize /g" -e "s/ PSIZE / $psize /g"`
 	rm -f $TEST_DIR/junk
-	$here/ltp/fsx $@ $TEST_DIR/junk >>$seq.full 2>&1
+	$here/ltp/fsx $args $TEST_DIR/junk >>$seq.full 2>&1
 	if [ $? -ne 0 ]; then
 		cat $seq.full
 		exit 1
@@ -56,21 +57,12 @@ run_fsx()
 }
 
 psize=`$here/src/feature -s`
-bsize=512
+bsize=`blockdev --getss $TEST_DEV`
 kernel=`uname -r  | sed -e 's/\(2\..\).*/\1/'`
 
 # 2.4 Linux kernels support bsize aligned direct I/O only
 [ "$HOSTOS" = "Linux" -a "$kernel" = "2.4" ] && bsize=$psize
 
-# 2.6 Linux kernels support sector aligned direct I/O only
-if [ "$HOSTOS" = "Linux" -a "$kernel" = "2.6" ]; then
-	xfs_info $TEST_DIR | _filter_mkfs 2> $tmp.info > /dev/null
-	if [ $? -eq 0 ]; then
-		source $tmp.info
-		bsize=$sectsz
-	fi
-fi
-
 # fsx usage:
 # 
 # -N numops: total # operations to do 
@@ -85,16 +77,16 @@ fi
 # -W: mapped write operations DISabled
 
 #run_fsx -N 10000            -l 500000 -r $psize -t $psize -w $psize -Z -R -W
- run_fsx -N 10000            -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
- run_fsx -N 10000  -o 8192   -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
-#run_fsx -N 10000  -o 16384  -l 500000 -r $psize -t $psize -w $psize -Z -R -W
- run_fsx -N 10000  -o 32768  -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
-#run_fsx -N 10000  -o 128000 -l 500000 -r $psize -t $psize -w $psize -Z -R -W
- run_fsx -N 10000  -o 8192   -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
-#run_fsx -N 10000  -o 16384  -l 500000 -r $psize -t $psize -w $psize -Z -R -W
- run_fsx -N 10000  -o 32768  -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
-#run_fsx -N 10000  -o 128000 -l 500000 -r $psize -t $psize -w $psize -Z -W
- run_fsx -N 10000  -o 128000 -l 500000 -r $psize -t $bsize -w $bsize -Z -W
+ run_fsx -N 10000            -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
+ run_fsx -N 10000  -o 8192   -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
+#run_fsx -N 10000  -o 16384  -l 500000 -r PSIZE -t PSIZE -w PSIZE -Z -R -W
+ run_fsx -N 10000  -o 32768  -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
+#run_fsx -N 10000  -o 128000 -l 500000 -r PSIZE -t PSIZE -w PSIZE -Z -R -W
+ run_fsx -N 10000  -o 8192   -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
+#run_fsx -N 10000  -o 16384  -l 500000 -r PSIZE -t PSIZE -w PSIZE -Z -R -W
+ run_fsx -N 10000  -o 32768  -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
+#run_fsx -N 10000  -o 128000 -l 500000 -r PSIZE -t PSIZE -w PSIZE -Z -W
+ run_fsx -N 10000  -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -W
 
 # Commented out calls above are less likely to pick up issues, so
 # save time by commenting them out (leave 'em for manual testing).

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch][xfstests-dev] 091: fix up output when pagesize == sectorsize
  2011-02-14 16:44 [patch][xfstests-dev] 091: fix up output when pagesize == sectorsize Jeff Moyer
@ 2011-02-16 10:45 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2011-02-16 10:45 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: xfs

Thanks, applied both patches.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-16 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 16:44 [patch][xfstests-dev] 091: fix up output when pagesize == sectorsize Jeff Moyer
2011-02-16 10:45 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.