linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfstests 299-305: remove fio config files after finished test
@ 2013-03-19  9:30 Zheng Liu
  2013-03-19 16:19 ` Eric Sandeen
  2013-03-21  1:09 ` Dave Chinner
  0 siblings, 2 replies; 6+ messages in thread
From: Zheng Liu @ 2013-03-19  9:30 UTC (permalink / raw)
  To: xfs; +Cc: linux-ext4, Zheng Liu

From: Zheng Liu <wenqing.lz@taobao.com>

After finished test, temporarily fio config file should be removed.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 299 | 2 +-
 300 | 2 +-
 301 | 2 +-
 302 | 2 +-
 303 | 2 +-
 304 | 2 +-
 305 | 1 +
 7 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/299 b/299
index 4305ead..9d0c32f 100644
--- a/299
+++ b/299
@@ -32,7 +32,7 @@ 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
+trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
diff --git a/300 b/300
index 73c9ea7..413f9eb 100644
--- a/300
+++ b/300
@@ -32,7 +32,7 @@ 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
+trap "rm -f $tmp.*; rm $tmp-$seq.fio; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
diff --git a/301 b/301
index fe2e59f..6ac8ecf 100644
--- a/301
+++ b/301
@@ -30,7 +30,7 @@ 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
+trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
diff --git a/302 b/302
index e3dceb8..62398c9 100644
--- a/302
+++ b/302
@@ -31,7 +31,7 @@ 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
+trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
diff --git a/303 b/303
index 4141442..d198ebb 100644
--- a/303
+++ b/303
@@ -31,7 +31,7 @@ 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
+trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
diff --git a/304 b/304
index 5c414bd..fb94fe6 100644
--- a/304
+++ b/304
@@ -32,7 +32,7 @@ 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
+trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
diff --git a/305 b/305
index 6393461..9d89321 100644
--- a/305
+++ b/305
@@ -80,6 +80,7 @@ _cleanup()
 {
     poweron_scratch_dev
     disallow_fail_make_request
+    rm -f $tmp-$seq.fio
 }
 trap "_cleanup; exit \$status" 1 2 3 15
 
-- 
1.7.12.rc2.18.g61b472e


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

* Re: [PATCH] xfstests 299-305: remove fio config files after finished test
  2013-03-19  9:30 [PATCH] xfstests 299-305: remove fio config files after finished test Zheng Liu
@ 2013-03-19 16:19 ` Eric Sandeen
  2013-03-20  5:37   ` Zheng Liu
  2013-03-21  1:09 ` Dave Chinner
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Sandeen @ 2013-03-19 16:19 UTC (permalink / raw)
  To: Zheng Liu; +Cc: xfs, linux-ext4, Zheng Liu

On 3/19/13 4:30 AM, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
> 
> After finished test, temporarily fio config file should be removed.

Looks fine, except that in test 300 you don't do rm -f; in every
other test -f is used.  Was that intentional?

Also, while looking at this, in 305 cleanup uses "poweron_scratch_dev"
- is that defined anywhere?  I can't find it.

-Eric

> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> ---
>  299 | 2 +-
>  300 | 2 +-
>  301 | 2 +-
>  302 | 2 +-
>  303 | 2 +-
>  304 | 2 +-
>  305 | 1 +
>  7 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/299 b/299
> index 4305ead..9d0c32f 100644
> --- a/299
> +++ b/299
> @@ -32,7 +32,7 @@ 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
> +trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
>  
>  # get standard environment, filters and checks
>  . ./common.rc
> diff --git a/300 b/300
> index 73c9ea7..413f9eb 100644
> --- a/300
> +++ b/300
> @@ -32,7 +32,7 @@ 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
> +trap "rm -f $tmp.*; rm $tmp-$seq.fio; exit \$status" 0 1 2 3 15
>  
>  # get standard environment, filters and checks
>  . ./common.rc
> diff --git a/301 b/301
> index fe2e59f..6ac8ecf 100644
> --- a/301
> +++ b/301
> @@ -30,7 +30,7 @@ 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
> +trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
>  
>  # get standard environment, filters and checks
>  . ./common.rc
> diff --git a/302 b/302
> index e3dceb8..62398c9 100644
> --- a/302
> +++ b/302
> @@ -31,7 +31,7 @@ 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
> +trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
>  
>  # get standard environment, filters and checks
>  . ./common.rc
> diff --git a/303 b/303
> index 4141442..d198ebb 100644
> --- a/303
> +++ b/303
> @@ -31,7 +31,7 @@ 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
> +trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
>  
>  # get standard environment, filters and checks
>  . ./common.rc
> diff --git a/304 b/304
> index 5c414bd..fb94fe6 100644
> --- a/304
> +++ b/304
> @@ -32,7 +32,7 @@ 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
> +trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
>  
>  # get standard environment, filters and checks
>  . ./common.rc
> diff --git a/305 b/305
> index 6393461..9d89321 100644
> --- a/305
> +++ b/305
> @@ -80,6 +80,7 @@ _cleanup()
>  {
>      poweron_scratch_dev
>      disallow_fail_make_request
> +    rm -f $tmp-$seq.fio
>  }
>  trap "_cleanup; exit \$status" 1 2 3 15
>  
> 


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

* Re: [PATCH] xfstests 299-305: remove fio config files after finished test
  2013-03-19 16:19 ` Eric Sandeen
@ 2013-03-20  5:37   ` Zheng Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Zheng Liu @ 2013-03-20  5:37 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs, linux-ext4, Zheng Liu

On Tue, Mar 19, 2013 at 11:19:48AM -0500, Eric Sandeen wrote:
> On 3/19/13 4:30 AM, Zheng Liu wrote:
> > From: Zheng Liu <wenqing.lz@taobao.com>
> > 
> > After finished test, temporarily fio config file should be removed.
> 
> Looks fine, except that in test 300 you don't do rm -f; in every
> other test -f is used.  Was that intentional?

Thanks for pointing it out.  It's a typo.  I will submit a newer patch
to fix it.

> 
> Also, while looking at this, in 305 cleanup uses "poweron_scratch_dev"
> - is that defined anywhere?  I can't find it.

Yeah, I also cannot find it.  I am not sure why it is called here.  I
will take a look at it and make sure that we can remove it.

Regards,
                                                - Zheng

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

* Re: [PATCH] xfstests 299-305: remove fio config files after finished test
  2013-03-19  9:30 [PATCH] xfstests 299-305: remove fio config files after finished test Zheng Liu
  2013-03-19 16:19 ` Eric Sandeen
@ 2013-03-21  1:09 ` Dave Chinner
  2013-03-21  2:07   ` Eric Sandeen
  1 sibling, 1 reply; 6+ messages in thread
From: Dave Chinner @ 2013-03-21  1:09 UTC (permalink / raw)
  To: Zheng Liu; +Cc: xfs, linux-ext4, Zheng Liu

On Tue, Mar 19, 2013 at 05:30:50PM +0800, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
> 
> After finished test, temporarily fio config file should be removed.
> 
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> ---
>  299 | 2 +-
>  300 | 2 +-
>  301 | 2 +-
>  302 | 2 +-
>  303 | 2 +-
>  304 | 2 +-
>  305 | 1 +
>  7 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/299 b/299
> index 4305ead..9d0c32f 100644
> --- a/299
> +++ b/299
> @@ -32,7 +32,7 @@ echo "QA output created by $seq"
>  here=`pwd`
>  tmp=/tmp/$$
>  status=1	# failure is the default!
> +trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15

Umm, wouldn't this be better:

-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "rm -f $tmp*; exit \$status" 0 1 2 3 15


Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

* Re: [PATCH] xfstests 299-305: remove fio config files after finished test
  2013-03-21  1:09 ` Dave Chinner
@ 2013-03-21  2:07   ` Eric Sandeen
  2013-03-21  2:47     ` Dave Chinner
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Sandeen @ 2013-03-21  2:07 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Zheng Liu, xfs, linux-ext4, Zheng Liu

On 3/20/13 8:09 PM, Dave Chinner wrote:
> On Tue, Mar 19, 2013 at 05:30:50PM +0800, Zheng Liu wrote:
>> From: Zheng Liu <wenqing.lz@taobao.com>
>>
>> After finished test, temporarily fio config file should be removed.
>>
>> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
>> ---
>>  299 | 2 +-
>>  300 | 2 +-
>>  301 | 2 +-
>>  302 | 2 +-
>>  303 | 2 +-
>>  304 | 2 +-
>>  305 | 1 +
>>  7 files changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/299 b/299
>> index 4305ead..9d0c32f 100644
>> --- a/299
>> +++ b/299
>> @@ -32,7 +32,7 @@ echo "QA output created by $seq"
>>  here=`pwd`
>>  tmp=/tmp/$$
>>  status=1	# failure is the default!
>> +trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
> 
> Umm, wouldn't this be better:
> 
> -trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
> +trap "rm -f $tmp*; exit \$status" 0 1 2 3 15
> 

Naming the files $tmp.fio would have worked too, but *shrug*
doesn't seem that critical.  Still:

>      2. You can safely create temporary files that are not part of the
>         filesystem tests (e.g. to catch output, prepare lists of things
>         to do, etc.) in files named $tmp.<anything>.  The standard test
>         script framework created by "new" will initialize $tmp and
>         cleanup on exit.

-Eric

> Cheers,
> 
> Dave.
> 


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

* Re: [PATCH] xfstests 299-305: remove fio config files after finished test
  2013-03-21  2:07   ` Eric Sandeen
@ 2013-03-21  2:47     ` Dave Chinner
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Chinner @ 2013-03-21  2:47 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Zheng Liu, xfs, linux-ext4, Zheng Liu

On Wed, Mar 20, 2013 at 09:07:27PM -0500, Eric Sandeen wrote:
> On 3/20/13 8:09 PM, Dave Chinner wrote:
> > On Tue, Mar 19, 2013 at 05:30:50PM +0800, Zheng Liu wrote:
> >> From: Zheng Liu <wenqing.lz@taobao.com>
> >>
> >> After finished test, temporarily fio config file should be removed.
> >>
> >> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> >> ---
> >>  299 | 2 +-
> >>  300 | 2 +-
> >>  301 | 2 +-
> >>  302 | 2 +-
> >>  303 | 2 +-
> >>  304 | 2 +-
> >>  305 | 1 +
> >>  7 files changed, 7 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/299 b/299
> >> index 4305ead..9d0c32f 100644
> >> --- a/299
> >> +++ b/299
> >> @@ -32,7 +32,7 @@ echo "QA output created by $seq"
> >>  here=`pwd`
> >>  tmp=/tmp/$$
> >>  status=1	# failure is the default!
> >> +trap "rm -f $tmp.*; rm -f $tmp-$seq.fio; exit \$status" 0 1 2 3 15
> > 
> > Umm, wouldn't this be better:
> > 
> > -trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
> > +trap "rm -f $tmp*; exit \$status" 0 1 2 3 15
> > 
> 
> Naming the files $tmp.fio would have worked too, but *shrug*
> doesn't seem that critical.  Still:
> 
> >      2. You can safely create temporary files that are not part of the
> >         filesystem tests (e.g. to catch output, prepare lists of things
> >         to do, etc.) in files named $tmp.<anything>.  The standard test
> >         script framework created by "new" will initialize $tmp and
> >         cleanup on exit.

Good point. With that in mind, I think renaming the fio files is the
right thing to do, not changing the traps to have to handle
arbitrary tmp file names...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

end of thread, other threads:[~2013-03-21  2:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-19  9:30 [PATCH] xfstests 299-305: remove fio config files after finished test Zheng Liu
2013-03-19 16:19 ` Eric Sandeen
2013-03-20  5:37   ` Zheng Liu
2013-03-21  1:09 ` Dave Chinner
2013-03-21  2:07   ` Eric Sandeen
2013-03-21  2:47     ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).