lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-2b28a8609ec9891e37607ae20688b4ab34f2778c@git.kernel.org>
Date:   Tue, 11 Dec 2018 07:24:23 -0800
From:   tip-bot for Bart Van Assche <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tglx@...utronix.de, johannes@...solutions.net,
        sasha.levin@...cle.com, torvalds@...ux-foundation.org,
        hpa@...or.com, longman@...hat.com, linux-kernel@...r.kernel.org,
        mingo@...nel.org, peterz@...radead.org, bvanassche@....org
Subject: [tip:locking/core] tools/lib/lockdep/tests: Run lockdep tests a
 second time under Valgrind

Commit-ID:  2b28a8609ec9891e37607ae20688b4ab34f2778c
Gitweb:     https://git.kernel.org/tip/2b28a8609ec9891e37607ae20688b4ab34f2778c
Author:     Bart Van Assche <bvanassche@....org>
AuthorDate: Thu, 6 Dec 2018 17:11:28 -0800
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 11 Dec 2018 14:54:49 +0100

tools/lib/lockdep/tests: Run lockdep tests a second time under Valgrind

This improves test coverage.

Signed-off-by: Bart Van Assche <bvanassche@....org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Johannes Berg <johannes@...solutions.net>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Sasha Levin <sasha.levin@...cle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Waiman Long <longman@...hat.com>
Cc: johannes.berg@...el.com
Cc: tj@...nel.org
Link: https://lkml.kernel.org/r/20181207011148.251812-5-bvanassche@acm.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 tools/lib/lockdep/run_tests.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tools/lib/lockdep/run_tests.sh b/tools/lib/lockdep/run_tests.sh
index bc36178329a8..c8fbd0306960 100755
--- a/tools/lib/lockdep/run_tests.sh
+++ b/tools/lib/lockdep/run_tests.sh
@@ -31,3 +31,17 @@ find tests -name '*.c' | sort | while read -r i; do
 	fi
 	rm -f "tests/$testname"
 done
+
+find tests -name '*.c' | sort | while read -r i; do
+	testname=$(basename "$i" .c)
+	echo -ne "(PRELOAD + Valgrind) $testname... "
+	if gcc -o "tests/$testname" -pthread -Iinclude "$i" &&
+		{ timeout 10 valgrind --read-var-info=yes ./lockdep "./tests/$testname" >& "tests/${testname}.vg.out"; true; } &&
+		"tests/${testname}.sh" < "tests/${testname}.vg.out" &&
+		! grep -Eq '(^==[0-9]*== (Invalid |Uninitialised ))|Mismatched free|Source and destination overlap| UME ' "tests/${testname}.vg.out"; then
+		echo "PASSED!"
+	else
+		echo "FAILED!"
+	fi
+	rm -f "tests/$testname"
+done

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ