* [PATCH v2] xfstests: use correct size value in generic/273
@ 2013-11-21 13:32 Brian Foster
0 siblings, 0 replies; only message in thread
From: Brian Foster @ 2013-11-21 13:32 UTC (permalink / raw)
To: xfs
generic/273 factors the "space available" output from df into the
calculation for the size of the origin data set. Recent commit
bfdd1e72b358 xfstests: added -P option to $DF_PROG
... converted the use of 'df' to $DF_PROG. This implicitly adds the
-T parameter to add the fs type column, shifts the available space
column over by one and unintentionally causes 273 to look at "used
space" and create too small of a data set for a useful test.
Realign to the available space value.
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
v2:
- Use tail and simplified awk command to improve readability. [dchinner]
tests/generic/273 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/generic/273 b/tests/generic/273
index 63bbf9b..8e121a2 100755
--- a/tests/generic/273
+++ b/tests/generic/273
@@ -68,7 +68,7 @@ _file_create()
cd $SCRATCH_MNT/origin
- _disksize=`$DF_PROG --block-size=1 $SCRATCH_DEV | awk -v sd=$SCRATCH_DEV 'BEGIN{c=0}{for(i=1;i<=NF;++i){a[c]=$i;++c}}END{for(entry in a){if(a[entry] ~ sd){print a[entry + 3]; break}}}'`
+ _disksize=`$DF_PROG --block-size=1 $SCRATCH_DEV | tail -1 | awk '{ print $5 }'`
_disksize=$(($_disksize / 3))
_num=$(($_disksize / $count / $threads / 4096))
_count=$count
--
1.8.1.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-21 13:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 13:32 [PATCH v2] xfstests: use correct size value in generic/273 Brian Foster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox