|
From: Philippe W. <phi...@so...> - 2023-01-09 23:32:17
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=e41dff2999562246f0152a6403b668c7e9975a62 commit e41dff2999562246f0152a6403b668c7e9975a62 Author: Philippe Waroquiers <phi...@sk...> Date: Mon Jan 9 06:01:36 2023 +0100 Fix gdbserver tests failing when python code cannot be autoloaded. If the valgrind python code loading is not authorised by GDB config, ensure the related error messages and info messages are filtered. Diff: --- gdbserver_tests/filter_gdb.in | 8 +++++++- gdbserver_tests/filter_vgdb.in | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdbserver_tests/filter_gdb.in b/gdbserver_tests/filter_gdb.in index 82a7d4c384..03f26dc860 100755 --- a/gdbserver_tests/filter_gdb.in +++ b/gdbserver_tests/filter_gdb.in @@ -15,10 +15,16 @@ cat > $PATTERNFILE <<EOF # general way to delete uninteresting and varying lines. /filter_gdb BEGIN drop/,/filter_gdb END drop/d -# delete the messages produced by valgrind python code. +# delete messages produced by valgrind python code loading. /Loaded.*valgrind-monitor.py$/d /Type "help valgrind" for more info\.$/d +# delete messages produced when GDB auto-load denies loading python code. +# Note that the first pattern is also present in filter_vgdb.in +# as this line is output on stderr. +/warning: File .*valgrind-monitor.py.*declined.*/d +/To enable execution of this file add/,/info "(gdb)Auto-loading safe path"/d + # initial tty control character sent by gdb 7.0 s/^\[?1034hReading symbols/Reading symbols/ diff --git a/gdbserver_tests/filter_vgdb.in b/gdbserver_tests/filter_vgdb.in index 23be6a475d..fb5c484bf8 100755 --- a/gdbserver_tests/filter_vgdb.in +++ b/gdbserver_tests/filter_vgdb.in @@ -30,5 +30,8 @@ $SED -e '/rtld.c: Inappropriate ioctl for device\./d' | # similar for Debian 11.0 arm64 $SED -e '/_exit.c: Inappropriate ioctl for device\./d' | +# filter python loading denied error message (see also filter_gdb.in) +$SED -e '/warning: File .*valgrind-monitor.py.*declined.*/d' | + # and filter out any remaining empty lines $SED -e '/^$/d' |