]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix gdbserver tests failing when python code cannot be autoloaded.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 9 Jan 2023 05:01:36 +0000 (06:01 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 9 Jan 2023 23:28:38 +0000 (00:28 +0100)
If the valgrind python code loading is not authorised by GDB config,
ensure the related error messages and info messages are filtered.

gdbserver_tests/filter_gdb.in
gdbserver_tests/filter_vgdb.in

index 82a7d4c3844c2820f9a884a43798628157a7a790..03f26dc8608a3f3960c07d14e3c2f9c1c553d028 100755 (executable)
@@ -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/^\e\[?1034hReading symbols/Reading symbols/
 
index 23be6a475db916c8edc399fd29584e6704ce2aa2..fb5c484bf856e0f05e5e731fa636045ed3ae22b1 100755 (executable)
@@ -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'