diff options
author | Tom de Vries <tdevries@suse.de> | 2022-07-12 13:45:30 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-07-12 13:45:30 +0200 |
commit | 09559238fdcca6ffa2ddfdd6a89ac919a9ccb80d (patch) | |
tree | c8f096d361b26d9f2bd63278334ed0dc992f8012 /gdb/testsuite | |
parent | 02f0597c46892c4b69e0af45a95509bf310c759e (diff) | |
download | gdb-09559238fdcca6ffa2ddfdd6a89ac919a9ccb80d.zip gdb-09559238fdcca6ffa2ddfdd6a89ac919a9ccb80d.tar.gz gdb-09559238fdcca6ffa2ddfdd6a89ac919a9ccb80d.tar.bz2 |
[gdb/testsuite] Add tsan-suppressions.txt
Add a new file tsan-suppressions.txt, to suppress the "unlock unlocked mutex"
problem in ncurses, filed in PR29328.
The file is added to the TSAN_OPTIONS in lib/gdb.exp.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29328
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index a29b8f9..698dd14 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -32,6 +32,32 @@ if {$tool == ""} { # (which will affect any spawned sub-process) to avoid this. append ::env(ASAN_OPTIONS) ",detect_leaks=0" +# Add VAR_ID=VAL to ENV_VAR, unless ENV_VAR already contains a VAR_ID setting. + +proc set_sanitizer_default { env_var var_id val } { + global env + + if { ![info exists env($env_var) ] + || $env($env_var) == "" } { + # Set var_id (env_var non-existing / empty case). + append env($env_var) $var_id=$val + return + } + + if { [regexp $var_id= $env($env_var)] } { + # Don't set var_id. It's already set by the user, leave as is. + # Note that we could probably get the same result by unconditionally + # prepending it, but this way is less likely to cause confusion. + return + } + + # Set var_id (env_var not empty case). + append env($env_var) : $var_id=$val +} + +set_sanitizer_default TSAN_OPTIONS suppressions \ + $srcdir/../tsan-suppressions.txt + # List of procs to run in gdb_finish. set gdb_finish_hooks [list] |