[PATCH] test-suite: handle format with filename.c not existing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
---
 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


--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux