xfs
[Top] [All Lists]

Re: Snapshot regression test [WAS: re[6]: Summary - Snapshot Effort]

To: Greg Freemyer <freemyer@xxxxxxxxxxxxxxxxx>
Subject: Re: Snapshot regression test [WAS: re[6]: Summary - Snapshot Effort]
From: Nathan Scott <nathans@xxxxxxx>
Date: Wed, 28 Aug 2002 09:47:03 +1100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20020827190552.VHDK10702.imf26bis.bellsouth.net@TAZ2>; from freemyer@NorcrossGroup.com on Tue, Aug 27, 2002 at 03:04:35PM -0400
References: <20020827190552.VHDK10702.imf26bis.bellsouth.net@TAZ2>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Tue, Aug 27, 2002 at 03:04:35PM -0400, Greg Freemyer wrote:
> Nathan,

hey Greg,

> I have the very basics of a new test almost working.  I'm assuming it will be 
> 068.

Good stuff.  068 sounds fine.

> One big problem I have is that I start a background infinite loop of dd's to 
> generate some i/o load.
> 
> i.e.
> while true; do
>      dd if=/scratch/dummy of=/scratch/junk bs=64k >/dev/null 2>&1
>      rm /scratch/junk
>      sync
> done >/dev/null 2>&1 &
> 
> At the end of the script I kill this off.  Unfortunately, when it dies the 
> parent shell is notifying the user with output like:
> 
> > 068: line 127:  3956 Killed                  while true; do
> >     dd if=/scratch/dummy of=/scratch/junk bs=64k >/dev/null 2>&1; rm 
> > /scratch/junk; sync;
> > done >/dev/null 2>&1
> 
> in my 068.out file.  Since this has pids in the output, I always get a 
> failure message.
> 
> Is there a way to say that output should not be compared, or do you know some 
> shell trick to avoid having this output generated.

The trick is knowing where the output is coming from and selectively
filtering it so that you only have error/other messages which are of
relevence to the test being sent to the output file.

In your case, it looks like the parent shell of your while loop (this
is almost certainly this is the shell process running your script) is
the source of your "Killed" message.  So, one approach here would be
to do something like wrapping the loop in a sub-shell (using parens)
and sending that shell's output into oblivion, ala...

( while true; do
        ... foo ...
done ) >/dev/null 2>&1 &

You may also want to recheck your shell loop above, it doesn't look
quite like what I thought it was trying to do when I first read it -
are you missing a count=XXX argument from your dd?  If not, the rm and
sync will (by my reading of it, anyway) never get executed... and not
much point in making it a loop?  Perhaps I've misunderstood the intent
there though.

Have fun.

cheers.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>