All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: fix common rc file path in new
@ 2013-03-28 13:51 Eryu Guan
  2013-03-28 16:09 ` Rich Johnston
  2013-03-29  0:38 ` Dave Chinner
  0 siblings, 2 replies; 4+ messages in thread
From: Eryu Guan @ 2013-03-28 13:51 UTC (permalink / raw)
  To: xfs; +Cc: Eryu Guan

After the re-factor common.rc has been renamed to common/rc, fix the
path in script new, otherwise ./new reports

./new: line 26: ./common.rc: No such file or directory
Building include
Building lib
Building ltp
Building src
Building m4
./new: line 70: BEGIN{printf "%03d\n",+1}: command not found
Next test is
Error: test  already exists!

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
After applying this patch, ./new generates new test starting from 001,
so we have to maintain the seq number manually? Do we need an updated
version of new? eg. takes an argument to specify the test type like

	./new generic

and generates new test based on existing seq number in generic dir.

 new | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/new b/new
index 94638f6..b21e75b 100755
--- a/new
+++ b/new
@@ -23,7 +23,7 @@
 
 # generic initialization
 iam=new
-. ./common.rc
+. ./common/rc
 
 trap "rm -f /tmp/$$.; exit" 0 1 2 3 15
 
-- 
1.8.1.4

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

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

* Re: [PATCH] xfstests: fix common rc file path in new
  2013-03-28 13:51 [PATCH] xfstests: fix common rc file path in new Eryu Guan
@ 2013-03-28 16:09 ` Rich Johnston
  2013-03-29  3:18   ` Rich Johnston
  2013-03-29  0:38 ` Dave Chinner
  1 sibling, 1 reply; 4+ messages in thread
From: Rich Johnston @ 2013-03-28 16:09 UTC (permalink / raw)
  To: Eryu Guan; +Cc: xfs

On 03/28/2013 08:51 AM, Eryu Guan wrote:
> After the re-factor common.rc has been renamed to common/rc, fix the
> path in script new, otherwise ./new reports
>
> ./new: line 26: ./common.rc: No such file or directory
> Building include
> Building lib
> Building ltp
> Building src
> Building m4
> ./new: line 70: BEGIN{printf "%03d\n",+1}: command not found
> Next test is
> Error: test  already exists!
>
> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
> After applying this patch, ./new generates new test starting from 001,
> so we have to maintain the seq number manually? Do we need an updated
> version of new? eg. takes an argument to specify the test type like
>
> 	./new generic
That's a good idea, and numbers based on the next number for that test type.
>
> and generates new test based on existing seq number in generic dir.
>
>   new | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/new b/new
> index 94638f6..b21e75b 100755
> --- a/new
> +++ b/new
> @@ -23,7 +23,7 @@
>
>   # generic initialization
>   iam=new
> -. ./common.rc
> +. ./common/rc
>
>   trap "rm -f /tmp/$$.; exit" 0 1 2 3 15
>
>

You caught the first one but I think you should also change the template 
entries too:

123 # get standard environment, filters and checks
124 . ./common/rc
125 . ./common/filter

Other than that looks good.

--Rich


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

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

* Re: [PATCH] xfstests: fix common rc file path in new
  2013-03-28 13:51 [PATCH] xfstests: fix common rc file path in new Eryu Guan
  2013-03-28 16:09 ` Rich Johnston
@ 2013-03-29  0:38 ` Dave Chinner
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2013-03-29  0:38 UTC (permalink / raw)
  To: Eryu Guan; +Cc: xfs

On Thu, Mar 28, 2013 at 09:51:23PM +0800, Eryu Guan wrote:
> After the re-factor common.rc has been renamed to common/rc, fix the
> path in script new, otherwise ./new reports
> 
> ./new: line 26: ./common.rc: No such file or directory
> Building include
> Building lib
> Building ltp
> Building src
> Building m4
> ./new: line 70: BEGIN{printf "%03d\n",+1}: command not found
> Next test is
> Error: test  already exists!
> 
> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
> After applying this patch, ./new generates new test starting from 001,
> so we have to maintain the seq number manually? Do we need an updated
> version of new? eg. takes an argument to specify the test type like
> 
> 	./new generic
> 
> and generates new test based on existing seq number in generic dir.

We could, but this all has to change when we allow non-numeric test
names.  i.e. the 'new' script is just creating a test template and
you can simply copy it to where ever you need with the appropriate
name. So just fixing the includes are appropriate right now, I
think...

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] 4+ messages in thread

* Re: [PATCH] xfstests: fix common rc file path in new
  2013-03-28 16:09 ` Rich Johnston
@ 2013-03-29  3:18   ` Rich Johnston
  0 siblings, 0 replies; 4+ messages in thread
From: Rich Johnston @ 2013-03-29  3:18 UTC (permalink / raw)
  To: Eryu Guan; +Cc: xfs

On 03/28/2013 11:09 AM, Rich Johnston wrote:

>
> You caught the first one but I think you should also change the template
> entries too:
>
> 123 # get standard environment, filters and checks
> 124 . ./common/rc
> 125 . ./common/filter
>
> Other than that looks good.
>
> --Rich
>
>

I also noticed that there are several echo statements in the common 
directory that should be cleaned up with:

cd xfstests/common/
for f in `ls`; do sed -i -e's/common\./common\//g' $f; done

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

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

end of thread, other threads:[~2013-03-29  3:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-28 13:51 [PATCH] xfstests: fix common rc file path in new Eryu Guan
2013-03-28 16:09 ` Rich Johnston
2013-03-29  3:18   ` Rich Johnston
2013-03-29  0:38 ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.