Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix fortran module tests with stressed cpu
Date: Sat, 9 Oct 2021 11:36:17 +0200	[thread overview]
Message-ID: <20211009093615.GA22892@delia.home> (raw)

Hi,

When running these test-cases:
- gdb.fortran/info-modules.exp
- gdb.fortran/module.exp
- gdb.mi/mi-fortran-modules.exp
in conjunction with:
...
$ stress -c $(($(cat /proc/cpuinfo | grep -c "^processor") + 1))
...
I run into timeouts.

Fix this by using:
- "set auto-solib-add off" to avoid symbols of shared libs
  (which doesn't work for libc, now that libpthread_name_p has been
  updated to  match libc)
- "nosharedlibrary" to avoid symbols of libc

Tested on x86_64-linux.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28133

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix fortran module tests with stressed cpu

---
 gdb/testsuite/gdb.fortran/info-modules.exp  | 6 ++++++
 gdb/testsuite/gdb.fortran/module.exp        | 6 ++++++
 gdb/testsuite/gdb.mi/mi-fortran-modules.exp | 5 +++++
 3 files changed, 17 insertions(+)

diff --git a/gdb/testsuite/gdb.fortran/info-modules.exp b/gdb/testsuite/gdb.fortran/info-modules.exp
index c9d2a18e119..fe85f5060ac 100644
--- a/gdb/testsuite/gdb.fortran/info-modules.exp
+++ b/gdb/testsuite/gdb.fortran/info-modules.exp
@@ -28,11 +28,17 @@ if { [prepare_for_testing "failed to prepare" $testfile \
     return -1
 }
 
+# Avoid shared lib symbols.
+gdb_test_no_output "set auto-solib-add off"
+
 if { ![fortran_runto_main] } {
     perror "Could not run to main."
     continue
 }
 
+# Avoid libc symbols.
+gdb_test "nosharedlibrary"
+
 set logical4 [fortran_logical4]
 set integer4 [fortran_int4]
 set real4 [fortran_real4]
diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp
index b391855b2ee..c44c128c6c8 100644
--- a/gdb/testsuite/gdb.fortran/module.exp
+++ b/gdb/testsuite/gdb.fortran/module.exp
@@ -31,11 +31,17 @@ gdb_test "p modmany::var_i" " = 14" "stopped language detection"
 
 gdb_test "print mod1::var_const" " = 20" "fully qualified name of DW_TAG_constant"
 
+# Avoid shared lib symbols.
+gdb_test_no_output "set auto-solib-add off"
+
 if ![fortran_runto_main] then {
     perror "couldn't run to main"
     continue
 }
 
+# Avoid libc symbols.
+gdb_test "nosharedlibrary"
+
 set int_type [fortran_int4]
 
 # Test 'info variables' can find module variables.
diff --git a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
index fc1fa411ee3..871a25c65fc 100644
--- a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
+++ b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
@@ -30,8 +30,13 @@ if {[build_executable "failed to prepare" ${testfile} \
 
 mi_clean_restart $binfile
 
+# Avoid shared lib symbols.
+mi_gdb_test "-gdb-set auto-solib-add off" "\\^done"
+
 mi_runto_main
 
+# Avoid libc symbols.
+mi_gdb_test {-interpreter-exec console "nosharedlibrary"}
 
 # Patterns to skip optional system modules that appear with later versions of GFortran.
 set system_modules_pattern \

                 reply	other threads:[~2021-10-09  9:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211009093615.GA22892@delia.home \
    --to=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox