treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / testing / selftests / rcutorture / bin / configcheck.sh
blob31584cee84d71b61b706c1b75dcb5f9e88c7aa9b
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0+
4 # Usage: configcheck.sh .config .config-template
6 # Copyright (C) IBM Corporation, 2011
8 # Authors: Paul E. McKenney <paulmck@linux.ibm.com>
10 T=${TMPDIR-/tmp}/abat-chk-config.sh.$$
11 trap 'rm -rf $T' 0
12 mkdir $T
14 cat $1 > $T/.config
16 cat $2 | sed -e 's/\(.*\)=n/# \1 is not set/' -e 's/^#CHECK#//' |
17 grep -v '^CONFIG_INITRAMFS_SOURCE' |
18 awk '
20 print "if grep -q \"" $0 "\" < '"$T/.config"'";
21 print "then";
22 print "\t:";
23 print "else";
24 if ($1 == "#") {
25 print "\tif grep -q \"" $2 "\" < '"$T/.config"'";
26 print "\tthen";
27 print "\t\tif test \"$firsttime\" = \"\""
28 print "\t\tthen"
29 print "\t\t\tfirsttime=1"
30 print "\t\tfi"
31 print "\t\techo \":" $2 ": improperly set\"";
32 print "\telse";
33 print "\t\t:";
34 print "\tfi";
35 } else {
36 print "\tif test \"$firsttime\" = \"\""
37 print "\tthen"
38 print "\t\tfirsttime=1"
39 print "\tfi"
40 print "\techo \":" $0 ": improperly set\"";
42 print "fi";
43 }' | sh