From: Paul E. McKenney Date: Mon, 30 Sep 2013 22:16:14 +0000 (-0700) Subject: rcutorture: Eliminate duplicate .config-check code X-Git-Tag: v3.14-rc1~174^2^2^3~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50d48a1d154ef9ece016512817dbbd33c598f162;p=thirdparty%2Fkernel%2Flinux.git 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 Cc: Greg KH --- diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh index 926fbd30bcbd1..939c16cd03ab4 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 yes '' | make $buildloc oldconfig > $builddir/Make.modconfig.out 2>&1 # verify new config matches specification. +configcheck.sh $builddir/.config $c -sed -e 's/"//g' < $c > $T/c -sed -e 's/"//g' < $builddir/.config > $T/.config -sed -e 's/\(.*\)=n/# \1 is not set/' -e 's/^#CHECK#//' < $c | -awk ' - { - print "if grep -q \"" $0 "\" < '"$T/.config"'"; - print "then"; - print "\t:"; - print "else"; - if ($1 == "#") { - print "\tif grep -q \"" $2 "\" < '"$T/.config"'"; - print "\tthen"; - print "\t\techo \":" $2 ": improperly set\""; - print "\telse"; - print "\t\t:"; - print "\tfi"; - } else { - print "\techo \":" $0 ": improperly set\""; - } - print "fi"; - }' | sh > $T/diagnostics -if test -s $T/diagnostics -then - cat $T/diagnostics - exit 1 -fi exit 0