[binutils-gdb] gdb, btrace: simplify gdb.btrace/multi-inferior.exp

Markus Metzger mmetzger@sourceware.org
Mon Nov 3 06:40:56 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=522ff727b63e7cbcd0538e09d9ae1132e5e72586

commit 522ff727b63e7cbcd0538e09d9ae1132e5e72586
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Thu Feb 22 10:32:11 2024 +0000

    gdb, btrace: simplify gdb.btrace/multi-inferior.exp
    
    We don't really need three inferiors to test multi-inferior recording.
    We don't really need to check info record before starting recording.
    If we were recording, there would be output, causing a fail.
    
    This just complicates the test when there is something to debug.

Diff:
---
 gdb/testsuite/gdb.btrace/multi-inferior.exp | 23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)

diff --git a/gdb/testsuite/gdb.btrace/multi-inferior.exp b/gdb/testsuite/gdb.btrace/multi-inferior.exp
index fc75233e58f..7ce221025b5 100644
--- a/gdb/testsuite/gdb.btrace/multi-inferior.exp
+++ b/gdb/testsuite/gdb.btrace/multi-inferior.exp
@@ -17,8 +17,9 @@
 
 # Test that recording is per-inferior.
 #
-# When recording an inferior, threads from other inferiors, both existing
-# and newly created, are not automatically recorded.
+# When recording an inferior, threads from other inferiors are not
+# automatically recorded.  The "record btrace" command would fail if any
+# thread were already recording.
 #
 # Each inferior can be recorded separately.
 
@@ -50,25 +51,11 @@ with_test_prefix "inferior 2" {
 	return -1
     }
 
-    gdb_test_no_output "record btrace" "record btrace"
+    gdb_test_no_output "record btrace"
 }
 
 with_test_prefix "inferior 1" {
     gdb_test "inferior 1" "Switching to inferior 1.*"
 
-    gdb_test "info record" "No recording is currently active\\."
-    gdb_test_no_output "record btrace" "record btrace"
-}
-
-with_test_prefix "inferior 3" {
-    gdb_test "add-inferior -exec ${host_binfile}" "Added inferior 3.*" \
-	"add third inferior"
-    gdb_test "inferior 3" "Switching to inferior 3.*"
-
-    if {![runto_main]} {
-	return -1
-    }
-
-    gdb_test "info record" "No recording is currently active\\."
-    gdb_test_no_output "record btrace" "record btrace"
+    gdb_test_no_output "record btrace"
 }


More information about the Gdb-cvs mailing list