linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] test-suite: handle format with filename.c not existing
@ 2018-01-22 19:05 Randy Dunlap
  2018-01-23 11:22 ` Christopher Li
  2018-01-24  8:28 ` Luc Van Oostenryck
  0 siblings, 2 replies; 13+ messages in thread
From: Randy Dunlap @ 2018-01-22 19:05 UTC (permalink / raw)
  To: Linux-Sparse, Christopher Li

From: Randy Dunlap <rdunlap@infradead.org>

In error(), quiet is undefined when the command:
  $ ./test-suite format filename1.c foobar1

is used and filename1.c does not exist. This causes a shell script error:
  ./test-suite: line 147: [: : integer expression expected

because $quiet is undefined in
  [ "$quiet" -ne 1 ] && echo "error: $1"
so the error message is lost.

Just initialize quiet before any command line parsing.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
 validation/test-suite |    2 ++
 1 file changed, 2 insertions(+)

--- sprs.orig/validation/test-suite
+++ sprs.next/validation/test-suite
@@ -368,6 +368,8 @@ arg_file()
 	return 0
 }
 
+quiet=0
+
 case "$1" in
 	'')
 		do_test_suite



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

end of thread, other threads:[~2018-01-24 19:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-22 19:05 [PATCH] test-suite: handle format with filename.c not existing Randy Dunlap
2018-01-23 11:22 ` Christopher Li
2018-01-23 18:20   ` Randy Dunlap
2018-01-23 23:38     ` Christopher Li
2018-01-24  1:38       ` Randy Dunlap
2018-01-24 19:19         ` Christopher Li
2018-01-24 19:26           ` Randy Dunlap
2018-01-24  8:15     ` Luc Van Oostenryck
2018-01-24  8:28 ` Luc Van Oostenryck
2018-01-24 17:48   ` Randy Dunlap
2018-01-24 19:13     ` Christopher Li
2018-01-24 19:19     ` Luc Van Oostenryck
2018-01-24 19:25       ` Luc Van Oostenryck

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).