From: Tom Marek <tmarek@redhat.com>
To: xfs@oss.sgi.com
Cc: Tom Marek <tmarek@redhat.com>, lczerner@redhat.com, dchinner@redhat.com
Subject: [PATCH 3/3 V2] xfstests 273: fix of reading scratch size and removing lost+found
Date: Tue, 17 Apr 2012 11:24:47 +0200 [thread overview]
Message-ID: <1334654687-25450-3-git-send-email-tmarek@redhat.com> (raw)
In-Reply-To: <1334654687-25450-1-git-send-email-tmarek@redhat.com>
There were two reasons why test 273 was failing. Firstrly, it was removing
everything from SCRATCH_MNT directory at the beginning of tests including
the lost+found directory. This cauesd error while checking scratch fs after
finishing test. Secondly, obtaining of the partition size was not counting
with with behaviour of df utility which may split the line containg
informations about one partition when it is too long thus it may have returned
nothing.
First problem was solved with removing all unnecessary rm -rf commands and the
second one was fixed with alternative awk script which is able to deal with
any line splitting possible.
Signed-off-by: Tom Marek <tmarek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
---
273 | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/273 b/273
index 2965132..86262d1 100755
--- a/273
+++ b/273
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
- rm -rf $SCRATCH_MNT/* $tmp.*
+ rm -rf $tmp.*
_scratch_unmount
}
@@ -66,9 +66,9 @@ _file_create()
exit
fi
- cd $SCRATCH_MNT/origin
+ cd $SCRATCH_MNT
- _disksize=`df --block-size=1 | grep $SCRATCH_DEV | awk '{print $2}'`
+ _disksize=`df --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=$(($_disksize / 3))
_num=$(($_disksize / $count / $threads / 4096))
_count=$count
@@ -105,8 +105,6 @@ _do_workload()
{
_pids=""
_pid=1
-
- rm -rf $SCRATCH_MNT/*
_threads_set
_file_create
@@ -134,7 +132,7 @@ echo "------------------------------"
rm -f $seq.full
-umount $SCRATCH_DEV 2>/dev/null
+_scratch_unmount 2>/dev/null
_scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seq.full 2>&1
_scratch_mount
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-04-17 9:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 9:24 [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Tom Marek
2012-04-17 9:24 ` [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2 Tom Marek
2012-04-18 23:51 ` Dave Chinner
2012-04-19 8:32 ` Lukas Czerner
2012-04-19 13:53 ` Tom Marek
2012-04-17 9:24 ` Tom Marek [this message]
2012-04-19 0:01 ` [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Dave Chinner
2012-04-19 8:37 ` Lukas Czerner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334654687-25450-3-git-send-email-tmarek@redhat.com \
--to=tmarek@redhat.com \
--cc=dchinner@redhat.com \
--cc=lczerner@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox