Eric Sandeen
2013-Mar-13 14:57 UTC
[PATCH 2/3] xfstests: keep newlines out of SCRATCH_DEV_POOL
SCRATCH_DEV_POOL processing actually takes the first device out for SCRATCH_DEV and leaves the rest in SCRATCH_DEV_POOL. I''m not totally sold on that behavior, but for now, at least don''t populate SCRATCH_DEV_POOL with newlines. Cc: linux-btrfs@vger.kernel.org Signed-off-by: Eric Sandeen <sandeen@redhat.com> --- common.config | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common.config b/common.config index ed0f44c..5ac58bf 100644 --- a/common.config +++ b/common.config @@ -258,7 +258,7 @@ if [ ! -z "$SCRATCH_DEV_POOL" ]; then exit 1 fi SCRATCH_DEV=`echo $SCRATCH_DEV_POOL | awk ''{print $1}''` - SCRATCH_DEV_POOL=`echo $SCRATCH_DEV_POOL | awk ''{ for (i = 2; i <= NF; i++) print $i}''` + SCRATCH_DEV_POOL=`echo $SCRATCH_DEV_POOL | awk ''{ ORS=" "; for (i = 2; i <= NF; i++) print $i}''` fi echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1 -- 1.7.1 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs
Rich Johnston
2013-Mar-13 17:43 UTC
Re: [PATCH 2/3] xfstests: keep newlines out of SCRATCH_DEV_POOL
On 03/13/2013 09:57 AM, Eric Sandeen wrote:> SCRATCH_DEV_POOL processing actually takes the first > device out for SCRATCH_DEV and leaves the rest in > SCRATCH_DEV_POOL. > > I''m not totally sold on that behavior, but for now, > at least don''t populate SCRATCH_DEV_POOL with newlines.> > Cc: linux-btrfs@vger.kernel.org > Signed-off-by: Eric Sandeen <sandeen@redhat.com> > --- > common.config | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/common.config b/common.config > index ed0f44c..5ac58bf 100644 > --- a/common.config > +++ b/common.config > @@ -258,7 +258,7 @@ if [ ! -z "$SCRATCH_DEV_POOL" ]; then > exit 1 > fi > SCRATCH_DEV=`echo $SCRATCH_DEV_POOL | awk ''{print $1}''` > - SCRATCH_DEV_POOL=`echo $SCRATCH_DEV_POOL | awk ''{ for (i = 2; i <= NF; i++) print $i}''` > + SCRATCH_DEV_POOL=`echo $SCRATCH_DEV_POOL | awk ''{ ORS=" "; for (i = 2; i <= NF; i++) print $i}''` > fi > > echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1 >Is the purpose of this patch is so future improvements will be able to parse/use SCRATCH_DEV_POOL easier from within bash? Looks good Eric. Reviewed-by: <rjohnston@sgi.com> Regards --Rich -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Eric Sandeen
2013-Mar-13 17:45 UTC
Re: [PATCH 2/3] xfstests: keep newlines out of SCRATCH_DEV_POOL
On 3/13/13 12:43 PM, Rich Johnston wrote:> On 03/13/2013 09:57 AM, Eric Sandeen wrote: >> SCRATCH_DEV_POOL processing actually takes the first >> device out for SCRATCH_DEV and leaves the rest in >> SCRATCH_DEV_POOL. >> >> I''m not totally sold on that behavior, but for now, >> at least don''t populate SCRATCH_DEV_POOL with newlines. > >> >> Cc: linux-btrfs@vger.kernel.org >> Signed-off-by: Eric Sandeen <sandeen@redhat.com> >> --- >> common.config | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/common.config b/common.config >> index ed0f44c..5ac58bf 100644 >> --- a/common.config >> +++ b/common.config >> @@ -258,7 +258,7 @@ if [ ! -z "$SCRATCH_DEV_POOL" ]; then >> exit 1 >> fi >> SCRATCH_DEV=`echo $SCRATCH_DEV_POOL | awk ''{print $1}''` >> - SCRATCH_DEV_POOL=`echo $SCRATCH_DEV_POOL | awk ''{ for (i = 2; i <= NF; i++) print $i}''` >> + SCRATCH_DEV_POOL=`echo $SCRATCH_DEV_POOL | awk ''{ ORS=" "; for (i = 2; i <= NF; i++) print $i}''` >> fi >> >> echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1 >> > > Is the purpose of this patch is so future improvements will be able to parse/use SCRATCH_DEV_POOL easier from within bash?Yep, and just generally since it''s used as an argument, feeding a string w/ newlines to any command is just a bit odd. -Eric> Looks good Eric. > > Reviewed-by: <rjohnston@sgi.com> > > Regards > --Rich_______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs