All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] check: allow comments in exclude files
@ 2016-07-31 21:53 Omar Sandoval
  2016-08-02 23:20 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Omar Sandoval @ 2016-07-31 21:53 UTC (permalink / raw)
  To: fstests; +Cc: kernel-team

From: Omar Sandoval <osandov@fb.com>

Sometimes it's useful to keep track of why we're excluding a particular
test. Technically, we can include whatever explanation we want in the
exclude file since we just grep for the test names, but properly
supporting comments is a little more robust. This patch makes it so that
the rest of a line after a '#' is ignored.

Signed-off-by: Omar Sandoval <osandov@fb.com>
---
 check | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/check b/check
index 9fbc305e9021..69341d8c4f72 100755
--- a/check
+++ b/check
@@ -224,14 +224,14 @@ while [ $# -gt 0 ]; do
 	-X)	xfile=$2; shift ;
 		for d in $SRC_GROUPS $FSTYP; do
 			[ -f $SRC_DIR/$d/$xfile ] || continue
-			for f in `cat $SRC_DIR/$d/$xfile`; do
+			for f in `sed "s/#.*$//" $SRC_DIR/$d/$xfile`; do
 				echo $d/$f >> $tmp.xlist
 			done
 		done
 		;;
 	-E)	xfile=$2; shift ;
 		if [ -f $xfile ]; then
-			cat "$xfile" >> $tmp.xlist
+			sed "s/#.*$//" "$xfile" >> $tmp.xlist
 	        fi
 		;;
 	-s)	RUN_SECTION="$RUN_SECTION $2"; shift ;;
-- 
2.9.2


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

* Re: [PATCH] check: allow comments in exclude files
  2016-07-31 21:53 [PATCH] check: allow comments in exclude files Omar Sandoval
@ 2016-08-02 23:20 ` Dave Chinner
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Chinner @ 2016-08-02 23:20 UTC (permalink / raw)
  To: Omar Sandoval; +Cc: fstests, kernel-team

On Sun, Jul 31, 2016 at 02:53:44PM -0700, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
> 
> Sometimes it's useful to keep track of why we're excluding a particular
> test. Technically, we can include whatever explanation we want in the
> exclude file since we just grep for the test names, but properly
> supporting comments is a little more robust. This patch makes it so that
> the rest of a line after a '#' is ignored.
> 
> Signed-off-by: Omar Sandoval <osandov@fb.com>

seems reasonable to me.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

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

end of thread, other threads:[~2016-08-02 23:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31 21:53 [PATCH] check: allow comments in exclude files Omar Sandoval
2016-08-02 23:20 ` 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.