[PATCH 1/5] sparse: Show expected vs. actual output on test failure

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

 



This patch changes 'make check' output to show sparse output compared to
expected results upon unexpected test failure. For example,
static-forward-decl.c output would look like this if it would not be tagged as
"known to fail":

       TEST     static forward declaration (static-forward-decl.c)
  error: actual error text does not match expected error text.
  --- static-forward-decl.c.error.expected	2011-08-22 06:29:40.000000000 +0000
  +++ static-forward-decl.c.error.got	2011-08-22 06:29:40.000000000 +0000
  @@ -0,0 +1 @@
  +static-forward-decl.c:3:5: warning: symbol 'f' was not declared. Should it be static?
  error: see static-forward-decl.c.error.* for further investigation.
  info: test 'static-forward-decl.c' is known to fail

This makes it easier to detect and analyze test breakage.

Cc: Christopher Li <sparse@xxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 validation/test-suite |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/validation/test-suite b/validation/test-suite
index 42f7bd7..7549fd2 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -146,6 +146,8 @@ do_test()
 		if [ "$?" -eq "0" ]; then
 			echo "info: test '$file' is known to fail"
 			known_ko_tests=`expr $known_ko_tests + 1`
+		else
+			cat "$file".$stream.diff
 		fi
 		return 1
 	else
-- 
1.7.4.1

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