diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-09-30 18:16:14 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-12-03 13:11:14 -0500 |
commit | 50d48a1d154ef9ece016512817dbbd33c598f162 (patch) | |
tree | f92c0048d17208c40c85bd7e84d76cf863a1ccc9 /tools/testing | |
parent | 330a76f15651a715a54bc2022586a7be151c9963 (diff) |
rcutorture: Eliminate duplicate .config-check code
The commit uses configcheck.sh from within configinit.sh, replacing the
imperfect inline expansion that was there before.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/configinit.sh | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh index 926fbd30bcbd..939c16cd03ab 100755 --- a/tools/testing/selftests/rcutorture/bin/configinit.sh +++ b/tools/testing/selftests/rcutorture/bin/configinit.sh | |||
@@ -51,31 +51,6 @@ cp $builddir/.config $builddir/.config.new | |||
51 | yes '' | make $buildloc oldconfig > $builddir/Make.modconfig.out 2>&1 | 51 | yes '' | make $buildloc oldconfig > $builddir/Make.modconfig.out 2>&1 |
52 | 52 | ||
53 | # verify new config matches specification. | 53 | # verify new config matches specification. |
54 | configcheck.sh $builddir/.config $c | ||
54 | 55 | ||
55 | sed -e 's/"//g' < $c > $T/c | ||
56 | sed -e 's/"//g' < $builddir/.config > $T/.config | ||
57 | sed -e 's/\(.*\)=n/# \1 is not set/' -e 's/^#CHECK#//' < $c | | ||
58 | awk ' | ||
59 | { | ||
60 | print "if grep -q \"" $0 "\" < '"$T/.config"'"; | ||
61 | print "then"; | ||
62 | print "\t:"; | ||
63 | print "else"; | ||
64 | if ($1 == "#") { | ||
65 | print "\tif grep -q \"" $2 "\" < '"$T/.config"'"; | ||
66 | print "\tthen"; | ||
67 | print "\t\techo \":" $2 ": improperly set\""; | ||
68 | print "\telse"; | ||
69 | print "\t\t:"; | ||
70 | print "\tfi"; | ||
71 | } else { | ||
72 | print "\techo \":" $0 ": improperly set\""; | ||
73 | } | ||
74 | print "fi"; | ||
75 | }' | sh > $T/diagnostics | ||
76 | if test -s $T/diagnostics | ||
77 | then | ||
78 | cat $T/diagnostics | ||
79 | exit 1 | ||
80 | fi | ||
81 | exit 0 | 56 | exit 0 |