public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: before test execution, print test number to syslog
@ 2012-03-02 12:26 Stefan Behrens
  2012-03-02 14:57 ` Eric Sandeen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stefan Behrens @ 2012-03-02 12:26 UTC (permalink / raw)
  To: xfs

When the xfstests are executed in a batch (like "check 001-299")
and produce syslog output, it is helpful to know which test was
causing the output. Therefore each time a test is started, a
syslog message is generated that contains the number of the
xfstest.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
---
 check |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/check b/check
index f792009..883edcc 100755
--- a/check
+++ b/check
@@ -241,6 +241,7 @@ do
 	start=`_wallclock`
 	$timestamp && echo -n "	["`date "+%T"`"]"
 	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
+	logger "run xfstest $seq"
 	./$seq >$tmp.rawout 2>&1
 	sts=$?
 	$timestamp && _timestamp
-- 
1.7.3.4

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

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

* Re: [PATCH] xfstests: before test execution, print test number to syslog
  2012-03-02 12:26 [PATCH] xfstests: before test execution, print test number to syslog Stefan Behrens
@ 2012-03-02 14:57 ` Eric Sandeen
  2012-03-02 15:27   ` Stefan Behrens
  2012-03-05  0:31   ` David Sterba
  2012-03-02 15:29 ` Eric Sandeen
  2012-03-05  1:23 ` Dave Chinner
  2 siblings, 2 replies; 7+ messages in thread
From: Eric Sandeen @ 2012-03-02 14:57 UTC (permalink / raw)
  To: Stefan Behrens; +Cc: xfs

On 3/2/12 6:26 AM, Stefan Behrens wrote:
> When the xfstests are executed in a batch (like "check 001-299")
> and produce syslog output, it is helpful to know which test was
> causing the output. Therefore each time a test is started, a
> syslog message is generated that contains the number of the
> xfstest.
> 
> Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>

I like this; I almost sent a similar patch once.

But would like to let others chime in as well to be sure.

Is "logger" universal and portable to other systems?  That'd be
my only concern with the patch.

-Eric

> ---
>  check |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/check b/check
> index f792009..883edcc 100755
> --- a/check
> +++ b/check
> @@ -241,6 +241,7 @@ do
>  	start=`_wallclock`
>  	$timestamp && echo -n "	["`date "+%T"`"]"
>  	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
> +	logger "run xfstest $seq"
>  	./$seq >$tmp.rawout 2>&1
>  	sts=$?
>  	$timestamp && _timestamp

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

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

* Re: [PATCH] xfstests: before test execution, print test number to syslog
  2012-03-02 14:57 ` Eric Sandeen
@ 2012-03-02 15:27   ` Stefan Behrens
  2012-03-05  0:31   ` David Sterba
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Behrens @ 2012-03-02 15:27 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

On 3/2/2012 3:57 PM, Eric Sandeen wrote:
> On 3/2/12 6:26 AM, Stefan Behrens wrote:
>> When the xfstests are executed in a batch (like "check 001-299")
>> and produce syslog output, it is helpful to know which test was
>> causing the output. Therefore each time a test is started, a
>> syslog message is generated that contains the number of the
>> xfstest.
>>
>> Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
> 
> I like this; I almost sent a similar patch once.
> 
> But would like to let others chime in as well to be sure.
> 
> Is "logger" universal and portable to other systems?  That'd be
> my only concern with the patch.

logger(1) is included in the POSIX specification.


> 
> -Eric
> 
>> ---
>>  check |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/check b/check
>> index f792009..883edcc 100755
>> --- a/check
>> +++ b/check
>> @@ -241,6 +241,7 @@ do
>>  	start=`_wallclock`
>>  	$timestamp && echo -n "	["`date "+%T"`"]"
>>  	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
>> +	logger "run xfstest $seq"
>>  	./$seq >$tmp.rawout 2>&1
>>  	sts=$?
>>  	$timestamp && _timestamp

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

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

* Re: [PATCH] xfstests: before test execution, print test number to syslog
  2012-03-02 12:26 [PATCH] xfstests: before test execution, print test number to syslog Stefan Behrens
  2012-03-02 14:57 ` Eric Sandeen
@ 2012-03-02 15:29 ` Eric Sandeen
  2012-03-05  1:23 ` Dave Chinner
  2 siblings, 0 replies; 7+ messages in thread
From: Eric Sandeen @ 2012-03-02 15:29 UTC (permalink / raw)
  To: Stefan Behrens; +Cc: xfs

On 3/2/12 6:26 AM, Stefan Behrens wrote:
> When the xfstests are executed in a batch (like "check 001-299")
> and produce syslog output, it is helpful to know which test was
> causing the output. Therefore each time a test is started, a
> syslog message is generated that contains the number of the
> xfstest.
> 
> Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

I'd like to be sure others are ok with this, but I think
it's a good idea, thanks.

-Eric

> ---
>  check |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/check b/check
> index f792009..883edcc 100755
> --- a/check
> +++ b/check
> @@ -241,6 +241,7 @@ do
>  	start=`_wallclock`
>  	$timestamp && echo -n "	["`date "+%T"`"]"
>  	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
> +	logger "run xfstest $seq"
>  	./$seq >$tmp.rawout 2>&1
>  	sts=$?
>  	$timestamp && _timestamp

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

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

* Re: [PATCH] xfstests: before test execution, print test number to syslog
  2012-03-02 14:57 ` Eric Sandeen
  2012-03-02 15:27   ` Stefan Behrens
@ 2012-03-05  0:31   ` David Sterba
  1 sibling, 0 replies; 7+ messages in thread
From: David Sterba @ 2012-03-05  0:31 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Stefan Behrens, xfs

On Fri, Mar 02, 2012 at 08:57:51AM -0600, Eric Sandeen wrote:
> But would like to let others chime in as well to be sure.

I'll be another happy user of this enhancement.

thanks,
david

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

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

* Re: [PATCH] xfstests: before test execution, print test number to syslog
  2012-03-02 12:26 [PATCH] xfstests: before test execution, print test number to syslog Stefan Behrens
  2012-03-02 14:57 ` Eric Sandeen
  2012-03-02 15:29 ` Eric Sandeen
@ 2012-03-05  1:23 ` Dave Chinner
  2012-03-05 17:32   ` Stefan Behrens
  2 siblings, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2012-03-05  1:23 UTC (permalink / raw)
  To: Stefan Behrens; +Cc: xfs

On Fri, Mar 02, 2012 at 01:26:55PM +0100, Stefan Behrens wrote:
> When the xfstests are executed in a batch (like "check 001-299")
> and produce syslog output, it is helpful to know which test was
> causing the output. Therefore each time a test is started, a
> syslog message is generated that contains the number of the
> xfstest.
> 
> Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
> ---
>  check |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/check b/check
> index f792009..883edcc 100755
> --- a/check
> +++ b/check
> @@ -241,6 +241,7 @@ do
>  	start=`_wallclock`
>  	$timestamp && echo -n "	["`date "+%T"`"]"
>  	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
> +	logger "run xfstest $seq"
>  	./$seq >$tmp.rawout 2>&1
>  	sts=$?
>  	$timestamp && _timestamp

Only thing I'd suggest here is that errors (e.g. logger is not
installed) are redirected to /dev/null so there isn't additional
noise if we fail to log to syslog.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

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

* Re: [PATCH] xfstests: before test execution, print test number to syslog
  2012-03-05  1:23 ` Dave Chinner
@ 2012-03-05 17:32   ` Stefan Behrens
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Behrens @ 2012-03-05 17:32 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

On 3/5/2012 2:23 AM, Dave Chinner wrote:
> On Fri, Mar 02, 2012 at 01:26:55PM +0100, Stefan Behrens wrote:
>> When the xfstests are executed in a batch (like "check 001-299")
>> and produce syslog output, it is helpful to know which test was
>> causing the output. Therefore each time a test is started, a
>> syslog message is generated that contains the number of the
>> xfstest.
>>
>> Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
>> ---
>>  check |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/check b/check
>> index f792009..883edcc 100755
>> --- a/check
>> +++ b/check
>> @@ -241,6 +241,7 @@ do
>>  	start=`_wallclock`
>>  	$timestamp && echo -n "	["`date "+%T"`"]"
>>  	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
>> +	logger "run xfstest $seq"
>>  	./$seq >$tmp.rawout 2>&1
>>  	sts=$?
>>  	$timestamp && _timestamp
> 
> Only thing I'd suggest here is that errors (e.g. logger is not
> installed) are redirected to /dev/null so there isn't additional
> noise if we fail to log to syslog.

Patch v2 is sent which checks that logger can be executed. Additional
output cannot happen according to the sources. Thanks!


> 
> Cheers,
> 
> Dave.

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

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

end of thread, other threads:[~2012-03-05 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 12:26 [PATCH] xfstests: before test execution, print test number to syslog Stefan Behrens
2012-03-02 14:57 ` Eric Sandeen
2012-03-02 15:27   ` Stefan Behrens
2012-03-05  0:31   ` David Sterba
2012-03-02 15:29 ` Eric Sandeen
2012-03-05  1:23 ` Dave Chinner
2012-03-05 17:32   ` Stefan Behrens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox