rcutorture: Fix bug in reporting Kconfig mis-settings
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 10 Apr 2017 17:48:42 +0000 (10:48 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 8 Jun 2017 15:25:20 +0000 (08:25 -0700)
Kconfig "select" clauses can defeat Kconfig-fragment file attempts to
clear a given Kconfig variable, and dependencies can defeat attempts to
set a given Kconfig variable.  Because "select" clauses and dependencies
can be added at any time, there needs to be a way to verify that the
Kconfig-fragment file's requests were honored.  And there is, except
that it is buggy.  This commit therefore provides the needed fix.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
tools/testing/selftests/rcutorture/bin/configcheck.sh

index eee31e261bf7de01c8c368745cf006daeaba2623..70fca318a82b0b946e533f5a1b7c4a3f2b6570ff 100755 (executable)
@@ -27,7 +27,7 @@ cat $1 > $T/.config
 
 cat $2 | sed -e 's/\(.*\)=n/# \1 is not set/' -e 's/^#CHECK#//' |
 awk    '
-BEGIN  {
+{
                print "if grep -q \"" $0 "\" < '"$T/.config"'";
                print "then";
                print "\t:";