torture: Make kvm-find-errors.sh report link-time undefined symbols
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 10 Nov 2021 15:47:41 +0000 (07:47 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 1 Dec 2021 01:30:28 +0000 (17:30 -0800)
This commit makes kvm-find-errors.sh check for and report undefined
symbols that are detected at link time.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
tools/testing/selftests/rcutorture/bin/parse-build.sh

index daf64b5..2e9e9e2 100755 (executable)
@@ -30,9 +30,9 @@ editor=${EDITOR-vi}
 files=
 for i in ${rundir}/*/Make.out
 do
-       if egrep -q "error:|warning:" < $i
+       if egrep -q "error:|warning:|^ld: .*undefined reference to" < $i
        then
-               egrep "error:|warning:" < $i > $i.diags
+               egrep "error:|warning:|^ld: .*undefined reference to" < $i > $i.diags
                files="$files $i.diags $i"
        fi
 done
index 9313e50..2dbfca3 100755 (executable)
@@ -39,7 +39,8 @@ fi
 grep warning: < $F > $T/warnings
 grep "include/linux/*rcu*\.h:" $T/warnings > $T/hwarnings
 grep "kernel/rcu/[^/]*:" $T/warnings > $T/cwarnings
-cat $T/hwarnings $T/cwarnings > $T/rcuwarnings
+grep "^ld: .*undefined reference to" $T/warnings | head -1 > $T/ldwarnings
+cat $T/hwarnings $T/cwarnings $T/ldwarnings > $T/rcuwarnings
 if test -s $T/rcuwarnings
 then
        print_warning $title build errors: