diff options
Diffstat (limited to 'gdb/testsuite/gdb.multi')
65 files changed, 106 insertions, 69 deletions
diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.c b/gdb/testsuite/gdb.multi/attach-no-multi-process.c index 4f3f9c5..819d234 100644 --- a/gdb/testsuite/gdb.multi/attach-no-multi-process.c +++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2020-2024 Free Software Foundation, Inc. + Copyright 2020-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp index daa6d70..502f309 100644 --- a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp +++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp @@ -1,6 +1,6 @@ # This testcase is part of GDB, the GNU debugger. -# Copyright 2020-2024 Free Software Foundation, Inc. +# Copyright 2020-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -59,7 +59,10 @@ proc test {target_non_stop} { "switch to inferior 2" set res [gdbserver_start "--multi" ""] set gdbserver_gdbport [lindex $res 1] - gdb_target_cmd "extended-remote" $gdbserver_gdbport + if { [gdb_target_cmd_ext "extended-remote" $gdbserver_gdbport] == 2 } { + unsupported "non-stop RSP" + return + } # Start a program, then attach to it. set spawn_id_list [spawn_wait_for_attach [list $binfile]] diff --git a/gdb/testsuite/gdb.multi/attach-while-running.c b/gdb/testsuite/gdb.multi/attach-while-running.c index 14e4a65..26f5eae 100644 --- a/gdb/testsuite/gdb.multi/attach-while-running.c +++ b/gdb/testsuite/gdb.multi/attach-while-running.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2022-2024 Free Software Foundation, Inc. + Copyright 2022-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/attach-while-running.exp b/gdb/testsuite/gdb.multi/attach-while-running.exp index ca4fa63..723ebb2 100644 --- a/gdb/testsuite/gdb.multi/attach-while-running.exp +++ b/gdb/testsuite/gdb.multi/attach-while-running.exp @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Free Software Foundation, Inc. +# Copyright 2022-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,6 +37,7 @@ standard_testfile require can_spawn_for_attach +require allow_multi_inferior_tests if { [build_executable "failed to prepare" ${testfile} ${srcfile}] } { return @@ -49,7 +50,7 @@ proc do_test {} { } gdb_test -no-prompt-anchor "run &" - gdb_test "add-inferior" "Added inferior 2 on connection 1 .*" + gdb_test -no-prompt-anchor "add-inferior" "Added inferior 2 on connection 1 .*" gdb_test "inferior 2" "Switching to inferior 2 .*" set spawn_id [spawn_wait_for_attach $::binfile] diff --git a/gdb/testsuite/gdb.multi/base.exp b/gdb/testsuite/gdb.multi/base.exp index 834d961..4268149 100644 --- a/gdb/testsuite/gdb.multi/base.exp +++ b/gdb/testsuite/gdb.multi/base.exp @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Free Software Foundation, Inc. +# Copyright 2009-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp index 44a45a1..b2b4319 100644 --- a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp +++ b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Free Software Foundation, Inc. +# Copyright 2009-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/bp-thread-specific.c b/gdb/testsuite/gdb.multi/bp-thread-specific.c index c7516ad..f144500 100644 --- a/gdb/testsuite/gdb.multi/bp-thread-specific.c +++ b/gdb/testsuite/gdb.multi/bp-thread-specific.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2023-2024 Free Software Foundation, Inc. + Copyright 2023-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/bp-thread-specific.exp b/gdb/testsuite/gdb.multi/bp-thread-specific.exp index 11dc248..3fe4c20 100644 --- a/gdb/testsuite/gdb.multi/bp-thread-specific.exp +++ b/gdb/testsuite/gdb.multi/bp-thread-specific.exp @@ -1,4 +1,4 @@ -# Copyright 2023-2024 Free Software Foundation, Inc. +# Copyright 2023-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,6 +19,8 @@ # Also check that the correct thread-ids are used in the saved # breakpoints file. +require allow_multi_inferior_tests + # The plain remote target can't do multiple inferiors. require !use_gdb_stub diff --git a/gdb/testsuite/gdb.multi/checkpoint-multi.exp b/gdb/testsuite/gdb.multi/checkpoint-multi.exp index e401e5e..8439b8d 100644 --- a/gdb/testsuite/gdb.multi/checkpoint-multi.exp +++ b/gdb/testsuite/gdb.multi/checkpoint-multi.exp @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Free Software Foundation, Inc. +# Copyright 2009-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/dummy-frame-restore.c b/gdb/testsuite/gdb.multi/dummy-frame-restore.c index 6db0d30..1fc28eb 100644 --- a/gdb/testsuite/gdb.multi/dummy-frame-restore.c +++ b/gdb/testsuite/gdb.multi/dummy-frame-restore.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2014-2024 Free Software Foundation, Inc. + Copyright 2014-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/dummy-frame-restore.exp b/gdb/testsuite/gdb.multi/dummy-frame-restore.exp index 0bc5e6a..4119e3f 100644 --- a/gdb/testsuite/gdb.multi/dummy-frame-restore.exp +++ b/gdb/testsuite/gdb.multi/dummy-frame-restore.exp @@ -1,4 +1,4 @@ -# Copyright 2014-2024 Free Software Foundation, Inc. +# Copyright 2014-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,6 +19,8 @@ set executable ${testfile} # The plain remote target can't do multiple inferiors. require !use_gdb_stub +require allow_multi_inferior_tests + if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} { return -1 } diff --git a/gdb/testsuite/gdb.multi/gdb-settings.c b/gdb/testsuite/gdb.multi/gdb-settings.c index cb8b860..4caa75a 100644 --- a/gdb/testsuite/gdb.multi/gdb-settings.c +++ b/gdb/testsuite/gdb.multi/gdb-settings.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2023-2024 Free Software Foundation, Inc. + Copyright 2023-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/gdb-settings.exp b/gdb/testsuite/gdb.multi/gdb-settings.exp index ec708dd..b1acca0 100644 --- a/gdb/testsuite/gdb.multi/gdb-settings.exp +++ b/gdb/testsuite/gdb.multi/gdb-settings.exp @@ -1,6 +1,6 @@ # This testcase is part of GDB, the GNU debugger. -# Copyright 2023-2024 Free Software Foundation, Inc. +# Copyright 2023-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/goodbye.c b/gdb/testsuite/gdb.multi/goodbye.c index 6d0328b..8d4ff0c 100644 --- a/gdb/testsuite/gdb.multi/goodbye.c +++ b/gdb/testsuite/gdb.multi/goodbye.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2009-2024 Free Software Foundation, Inc. + Copyright 2009-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/hangout.c b/gdb/testsuite/gdb.multi/hangout.c index 192e118..93c7fac 100644 --- a/gdb/testsuite/gdb.multi/hangout.c +++ b/gdb/testsuite/gdb.multi/hangout.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2009-2024 Free Software Foundation, Inc. + Copyright 2009-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/hello.c b/gdb/testsuite/gdb.multi/hello.c index adb1b9d..9e95789 100644 --- a/gdb/testsuite/gdb.multi/hello.c +++ b/gdb/testsuite/gdb.multi/hello.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2009-2024 Free Software Foundation, Inc. + Copyright 2009-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/inferior-specific-bp-1.c b/gdb/testsuite/gdb.multi/inferior-specific-bp-1.c index 16db062..5f906db 100644 --- a/gdb/testsuite/gdb.multi/inferior-specific-bp-1.c +++ b/gdb/testsuite/gdb.multi/inferior-specific-bp-1.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2022-2024 Free Software Foundation, Inc. + Copyright 2022-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/inferior-specific-bp-2.c b/gdb/testsuite/gdb.multi/inferior-specific-bp-2.c index 3a45c21..e67b4c8 100644 --- a/gdb/testsuite/gdb.multi/inferior-specific-bp-2.c +++ b/gdb/testsuite/gdb.multi/inferior-specific-bp-2.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2022-2024 Free Software Foundation, Inc. + Copyright 2022-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/inferior-specific-bp.exp b/gdb/testsuite/gdb.multi/inferior-specific-bp.exp index 82cc924..db09095 100644 --- a/gdb/testsuite/gdb.multi/inferior-specific-bp.exp +++ b/gdb/testsuite/gdb.multi/inferior-specific-bp.exp @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Free Software Foundation, Inc. +# Copyright 2022-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/info-threads.exp b/gdb/testsuite/gdb.multi/info-threads.exp index 3b00948..ec2a140 100644 --- a/gdb/testsuite/gdb.multi/info-threads.exp +++ b/gdb/testsuite/gdb.multi/info-threads.exp @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Free Software Foundation, Inc. +# Copyright 2009-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.c b/gdb/testsuite/gdb.multi/multi-arch-exec.c index bf8cfd4..98f6b15 100644 --- a/gdb/testsuite/gdb.multi/multi-arch-exec.c +++ b/gdb/testsuite/gdb.multi/multi-arch-exec.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2012-2024 Free Software Foundation, Inc. + Copyright 2012-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.exp b/gdb/testsuite/gdb.multi/multi-arch-exec.exp index a69e122..69c6b13 100644 --- a/gdb/testsuite/gdb.multi/multi-arch-exec.exp +++ b/gdb/testsuite/gdb.multi/multi-arch-exec.exp @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Free Software Foundation, Inc. +# Copyright 2009-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-arch.exp b/gdb/testsuite/gdb.multi/multi-arch.exp index 559bd7b..1d41ba5 100644 --- a/gdb/testsuite/gdb.multi/multi-arch.exp +++ b/gdb/testsuite/gdb.multi/multi-arch.exp @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Free Software Foundation, Inc. +# Copyright 2009-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +18,8 @@ set testfile "multi-arch" +require allow_multi_inferior_tests + # The plain remote target can't do multiple inferiors. require !use_gdb_stub diff --git a/gdb/testsuite/gdb.multi/multi-attach.c b/gdb/testsuite/gdb.multi/multi-attach.c index 23160b6..3e1fd40 100644 --- a/gdb/testsuite/gdb.multi/multi-attach.c +++ b/gdb/testsuite/gdb.multi/multi-attach.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2007-2024 Free Software Foundation, Inc. + Copyright 2007-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-attach.exp b/gdb/testsuite/gdb.multi/multi-attach.exp index 4312636..210c8ca 100644 --- a/gdb/testsuite/gdb.multi/multi-attach.exp +++ b/gdb/testsuite/gdb.multi/multi-attach.exp @@ -1,6 +1,6 @@ # This testcase is part of GDB, the GNU debugger. -# Copyright 2007-2024 Free Software Foundation, Inc. +# Copyright 2007-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,6 +17,8 @@ # Test attaching to multiple threaded programs. +require allow_multi_inferior_tests + standard_testfile require can_spawn_for_attach diff --git a/gdb/testsuite/gdb.multi/multi-exit.c b/gdb/testsuite/gdb.multi/multi-exit.c index 27a14b7..65b18bc 100644 --- a/gdb/testsuite/gdb.multi/multi-exit.c +++ b/gdb/testsuite/gdb.multi/multi-exit.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2020-2024 Free Software Foundation, Inc. + Copyright 2020-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-exit.exp b/gdb/testsuite/gdb.multi/multi-exit.exp index 6ffbe5e..8393067 100644 --- a/gdb/testsuite/gdb.multi/multi-exit.exp +++ b/gdb/testsuite/gdb.multi/multi-exit.exp @@ -1,6 +1,6 @@ # This testcase is part of GDB, the GNU debugger. -# Copyright 2020-2024 Free Software Foundation, Inc. +# Copyright 2020-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +24,8 @@ standard_testfile +require allow_multi_inferior_tests + require !use_gdb_stub if {[build_executable "failed to prepare" $testfile $srcfile]} { diff --git a/gdb/testsuite/gdb.multi/multi-kill.c b/gdb/testsuite/gdb.multi/multi-kill.c index f097eab..cf601cd 100644 --- a/gdb/testsuite/gdb.multi/multi-kill.c +++ b/gdb/testsuite/gdb.multi/multi-kill.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2020-2024 Free Software Foundation, Inc. + Copyright 2020-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-kill.exp b/gdb/testsuite/gdb.multi/multi-kill.exp index aa39712..7d66ab0 100644 --- a/gdb/testsuite/gdb.multi/multi-kill.exp +++ b/gdb/testsuite/gdb.multi/multi-kill.exp @@ -1,6 +1,6 @@ # This testcase is part of GDB, the GNU debugger. -# Copyright 2020-2024 Free Software Foundation, Inc. +# Copyright 2020-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +24,8 @@ standard_testfile +require allow_multi_inferior_tests + require !use_gdb_stub if {[build_executable "failed to prepare" $testfile $srcfile {debug}]} { diff --git a/gdb/testsuite/gdb.multi/multi-re-run-1.c b/gdb/testsuite/gdb.multi/multi-re-run-1.c index f10b0da..2cba30a 100644 --- a/gdb/testsuite/gdb.multi/multi-re-run-1.c +++ b/gdb/testsuite/gdb.multi/multi-re-run-1.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2020-2024 Free Software Foundation, Inc. + Copyright 2020-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-re-run-2.c b/gdb/testsuite/gdb.multi/multi-re-run-2.c index d72162f..6a5d8d8 100644 --- a/gdb/testsuite/gdb.multi/multi-re-run-2.c +++ b/gdb/testsuite/gdb.multi/multi-re-run-2.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2020-2024 Free Software Foundation, Inc. + Copyright 2020-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-re-run.exp b/gdb/testsuite/gdb.multi/multi-re-run.exp index bf9a72c..4caadea 100644 --- a/gdb/testsuite/gdb.multi/multi-re-run.exp +++ b/gdb/testsuite/gdb.multi/multi-re-run.exp @@ -1,4 +1,4 @@ -# Copyright 2020-2024 Free Software Foundation, Inc. +# Copyright 2020-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,6 +20,8 @@ # misbehave, including failing to load libthread_db.so. See PR # gdb/25410. +require allow_multi_inferior_tests + # Build two executables, with different symbols. set exec1 "multi-re-run-1" diff --git a/gdb/testsuite/gdb.multi/multi-target-continue.exp b/gdb/testsuite/gdb.multi/multi-target-continue.exp index d4b2fc2..ed67ef6 100644 --- a/gdb/testsuite/gdb.multi/multi-target-continue.exp +++ b/gdb/testsuite/gdb.multi/multi-target-continue.exp @@ -1,4 +1,4 @@ -# Copyright 2017-2024 Free Software Foundation, Inc. +# Copyright 2017-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp index d69042d..e03dc60 100644 --- a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp +++ b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp @@ -1,4 +1,4 @@ -# Copyright 2017-2024 Free Software Foundation, Inc. +# Copyright 2017-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.py b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.py index 3fe7ea8..59557ae 100644 --- a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.py +++ b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2024 Free Software Foundation, Inc. +# Copyright (C) 2021-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-target-interrupt.exp b/gdb/testsuite/gdb.multi/multi-target-interrupt.exp index ce844d0..eda606f 100644 --- a/gdb/testsuite/gdb.multi/multi-target-interrupt.exp +++ b/gdb/testsuite/gdb.multi/multi-target-interrupt.exp @@ -1,4 +1,4 @@ -# Copyright 2017-2024 Free Software Foundation, Inc. +# Copyright 2017-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-target-no-resumed.exp b/gdb/testsuite/gdb.multi/multi-target-no-resumed.exp index b1203bd..4f93080 100644 --- a/gdb/testsuite/gdb.multi/multi-target-no-resumed.exp +++ b/gdb/testsuite/gdb.multi/multi-target-no-resumed.exp @@ -1,4 +1,4 @@ -# Copyright 2017-2024 Free Software Foundation, Inc. +# Copyright 2017-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-target-ping-pong-next.exp b/gdb/testsuite/gdb.multi/multi-target-ping-pong-next.exp index 36f9d24..b7d1529 100644 --- a/gdb/testsuite/gdb.multi/multi-target-ping-pong-next.exp +++ b/gdb/testsuite/gdb.multi/multi-target-ping-pong-next.exp @@ -1,4 +1,4 @@ -# Copyright 2017-2024 Free Software Foundation, Inc. +# Copyright 2017-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-target-thread-find.exp b/gdb/testsuite/gdb.multi/multi-target-thread-find.exp index 24d19d5..ba1ea95 100644 --- a/gdb/testsuite/gdb.multi/multi-target-thread-find.exp +++ b/gdb/testsuite/gdb.multi/multi-target-thread-find.exp @@ -1,4 +1,4 @@ -# Copyright 2020-2024 Free Software Foundation, Inc. +# Copyright 2020-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-target.c b/gdb/testsuite/gdb.multi/multi-target.c index aae53c0..e3c365d 100644 --- a/gdb/testsuite/gdb.multi/multi-target.c +++ b/gdb/testsuite/gdb.multi/multi-target.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2017-2024 Free Software Foundation, Inc. + Copyright 2017-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-target.exp.tcl b/gdb/testsuite/gdb.multi/multi-target.exp.tcl index 4f29de8..dc88ca4 100644 --- a/gdb/testsuite/gdb.multi/multi-target.exp.tcl +++ b/gdb/testsuite/gdb.multi/multi-target.exp.tcl @@ -1,4 +1,4 @@ -# Copyright 2017-2024 Free Software Foundation, Inc. +# Copyright 2017-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -175,6 +175,10 @@ proc multi_target_prepare {} { return 0 } + if {![allow_multi_inferior_tests]} { + return 0 + } + # The plain remote target can't do multiple inferiors. if {[target_info gdb_protocol] != ""} { return 0 diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.c b/gdb/testsuite/gdb.multi/multi-term-settings.c index e9e7e95..9079f76 100644 --- a/gdb/testsuite/gdb.multi/multi-term-settings.c +++ b/gdb/testsuite/gdb.multi/multi-term-settings.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2017-2024 Free Software Foundation, Inc. + Copyright 2017-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.exp b/gdb/testsuite/gdb.multi/multi-term-settings.exp index 0aeba1f..38322be 100644 --- a/gdb/testsuite/gdb.multi/multi-term-settings.exp +++ b/gdb/testsuite/gdb.multi/multi-term-settings.exp @@ -1,6 +1,6 @@ # This testcase is part of GDB, the GNU debugger. -# Copyright 2017-2024 Free Software Foundation, Inc. +# Copyright 2017-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,6 +25,8 @@ standard_testfile +require allow_multi_inferior_tests + require can_spawn_for_attach if [build_executable "failed to prepare" $testfile $srcfile {debug}] { diff --git a/gdb/testsuite/gdb.multi/pending-bp-del-inferior.c b/gdb/testsuite/gdb.multi/pending-bp-del-inferior.c index 1d03000..53dc9b2 100644 --- a/gdb/testsuite/gdb.multi/pending-bp-del-inferior.c +++ b/gdb/testsuite/gdb.multi/pending-bp-del-inferior.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2023 Free Software Foundation, Inc. + Copyright 2023-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp b/gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp index 12c0a84..a7055d7 100644 --- a/gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp +++ b/gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp @@ -1,4 +1,4 @@ -# Copyright 2023 Free Software Foundation, Inc. +# Copyright 2023-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/pending-bp-lib.c b/gdb/testsuite/gdb.multi/pending-bp-lib.c index c48e7f2..d34a103 100644 --- a/gdb/testsuite/gdb.multi/pending-bp-lib.c +++ b/gdb/testsuite/gdb.multi/pending-bp-lib.c @@ -1,4 +1,4 @@ -/* Copyright 2023-2024 Free Software Foundation, Inc. +/* Copyright 2023-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/pending-bp.c b/gdb/testsuite/gdb.multi/pending-bp.c index 17d9181..c7e00ce 100644 --- a/gdb/testsuite/gdb.multi/pending-bp.c +++ b/gdb/testsuite/gdb.multi/pending-bp.c @@ -1,4 +1,4 @@ -/* Copyright 2023-2024 Free Software Foundation, Inc. +/* Copyright 2023-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/pending-bp.exp b/gdb/testsuite/gdb.multi/pending-bp.exp index 2a0644b..1cd1cfb 100644 --- a/gdb/testsuite/gdb.multi/pending-bp.exp +++ b/gdb/testsuite/gdb.multi/pending-bp.exp @@ -1,4 +1,4 @@ -# Copyright 2023-2024 Free Software Foundation, Inc. +# Copyright 2023-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/remove-inferiors.c b/gdb/testsuite/gdb.multi/remove-inferiors.c index 1fc584b..4c037df 100644 --- a/gdb/testsuite/gdb.multi/remove-inferiors.c +++ b/gdb/testsuite/gdb.multi/remove-inferiors.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2016-2024 Free Software Foundation, Inc. + Copyright 2016-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/remove-inferiors.exp b/gdb/testsuite/gdb.multi/remove-inferiors.exp index 0e81c80..586d958 100644 --- a/gdb/testsuite/gdb.multi/remove-inferiors.exp +++ b/gdb/testsuite/gdb.multi/remove-inferiors.exp @@ -1,4 +1,4 @@ -# Copyright 2016-2024 Free Software Foundation, Inc. +# Copyright 2016-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/run-only-second-inf.c b/gdb/testsuite/gdb.multi/run-only-second-inf.c index 27a14b7..65b18bc 100644 --- a/gdb/testsuite/gdb.multi/run-only-second-inf.c +++ b/gdb/testsuite/gdb.multi/run-only-second-inf.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2020-2024 Free Software Foundation, Inc. + Copyright 2020-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/run-only-second-inf.exp b/gdb/testsuite/gdb.multi/run-only-second-inf.exp index be1d0df..7b6532c 100644 --- a/gdb/testsuite/gdb.multi/run-only-second-inf.exp +++ b/gdb/testsuite/gdb.multi/run-only-second-inf.exp @@ -1,6 +1,6 @@ # This testcase is part of GDB, the GNU debugger. -# Copyright 2020-2024 Free Software Foundation, Inc. +# Copyright 2020-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/start-inferior-specific-other.c b/gdb/testsuite/gdb.multi/start-inferior-specific-other.c index 2e907be..355fbb0 100644 --- a/gdb/testsuite/gdb.multi/start-inferior-specific-other.c +++ b/gdb/testsuite/gdb.multi/start-inferior-specific-other.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2022-2024 Free Software Foundation, Inc. + Copyright 2022-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/start-inferior-specific.c b/gdb/testsuite/gdb.multi/start-inferior-specific.c index 91f7abc..0a47e0e 100644 --- a/gdb/testsuite/gdb.multi/start-inferior-specific.c +++ b/gdb/testsuite/gdb.multi/start-inferior-specific.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2022-2024 Free Software Foundation, Inc. + Copyright 2022-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/start-inferior-specific.exp b/gdb/testsuite/gdb.multi/start-inferior-specific.exp index c2a8bdb..74f984c 100644 --- a/gdb/testsuite/gdb.multi/start-inferior-specific.exp +++ b/gdb/testsuite/gdb.multi/start-inferior-specific.exp @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Free Software Foundation, Inc. +# Copyright 2022-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,6 +25,8 @@ standard_testfile .c -other.c +require allow_multi_inferior_tests + require !use_gdb_stub set srcfile_other ${srcfile2} diff --git a/gdb/testsuite/gdb.multi/stop-all-on-exit.c b/gdb/testsuite/gdb.multi/stop-all-on-exit.c index 56df916..d672b07 100644 --- a/gdb/testsuite/gdb.multi/stop-all-on-exit.c +++ b/gdb/testsuite/gdb.multi/stop-all-on-exit.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2020-2024 Free Software Foundation, Inc. + Copyright 2020-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/stop-all-on-exit.exp b/gdb/testsuite/gdb.multi/stop-all-on-exit.exp index 1ac5388c..47071f3 100644 --- a/gdb/testsuite/gdb.multi/stop-all-on-exit.exp +++ b/gdb/testsuite/gdb.multi/stop-all-on-exit.exp @@ -1,6 +1,6 @@ # This testcase is part of GDB, the GNU debugger. -# Copyright 2020-2024 Free Software Foundation, Inc. +# Copyright 2020-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +18,8 @@ # Test that in all-stop mode with multiple inferiors, GDB stops all # threads upon receiving an exit event from one of the inferiors. +require allow_multi_inferior_tests + # This is a test specific for a native target, where we use the # "-exec" argument to "add-inferior" and we explicitly don't do # "maint set target-non-stop on". diff --git a/gdb/testsuite/gdb.multi/tids-gid-reset.c b/gdb/testsuite/gdb.multi/tids-gid-reset.c index c894e30..68e3308 100644 --- a/gdb/testsuite/gdb.multi/tids-gid-reset.c +++ b/gdb/testsuite/gdb.multi/tids-gid-reset.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2019-2024 Free Software Foundation, Inc. + Copyright 2019-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/tids-gid-reset.exp b/gdb/testsuite/gdb.multi/tids-gid-reset.exp index a366a35..1785ac2 100644 --- a/gdb/testsuite/gdb.multi/tids-gid-reset.exp +++ b/gdb/testsuite/gdb.multi/tids-gid-reset.exp @@ -1,4 +1,4 @@ -# Copyright 2015-2024 Free Software Foundation, Inc. +# Copyright 2015-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -54,6 +54,8 @@ with_test_prefix "single-inferior" { # non-extended gdbserver is not supported. require !use_gdb_stub +require allow_multi_inferior_tests + # Test with multiple inferiors. This time, since we restart inferior # 1 while inferior 2 still has threads, then the new thread 1.1 should # end up with GID == 3, since we won't be able to reset the global diff --git a/gdb/testsuite/gdb.multi/tids.c b/gdb/testsuite/gdb.multi/tids.c index 67f1074..811d803 100644 --- a/gdb/testsuite/gdb.multi/tids.c +++ b/gdb/testsuite/gdb.multi/tids.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2015-2024 Free Software Foundation, Inc. + Copyright 2015-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/tids.exp b/gdb/testsuite/gdb.multi/tids.exp index 4f78884..436a38a 100644 --- a/gdb/testsuite/gdb.multi/tids.exp +++ b/gdb/testsuite/gdb.multi/tids.exp @@ -1,4 +1,4 @@ -# Copyright 2015-2024 Free Software Foundation, Inc. +# Copyright 2015-2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -124,6 +124,9 @@ with_test_prefix "single inferior" { gdb_test "print \$_inferior_thread_count" " = 1" } +# The rest of the tests require running multiple inferiors. +require allow_multi_inferior_tests + # "info threads" while there are multiple inferiors should show # qualified thread IDs. with_test_prefix "two inferiors" { @@ -290,7 +293,7 @@ with_test_prefix "two inferiors" { # Try both the convenience variable and the literal number. foreach thr {"\$thr" "20" "1.20" "\$inf.1" "30.1" } { set expected [string_to_regexp $thr] - gdb_test "info threads $thr" "No threads match '${expected}'." + gdb_test "info threads $thr" "No threads matched\\." # "info threads" works like a filter. If there's any other # valid thread in the list, there's no error. info_threads "$thr 1.1" "1.1" @@ -412,7 +415,7 @@ with_test_prefix "two inferiors" { # Check that we do parse the inferior number and don't confuse it. gdb_test "info threads 3.1" \ - "No threads match '3.1'\." + "No threads matched\\." } if { [allow_python_tests] } { diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi-exit.c b/gdb/testsuite/gdb.multi/watchpoint-multi-exit.c index 5bdbf89..4574dab 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi-exit.c +++ b/gdb/testsuite/gdb.multi/watchpoint-multi-exit.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2016-2024 Free Software Foundation, Inc. + Copyright 2016-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp b/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp index 688b145..3446296 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp +++ b/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp @@ -1,4 +1,4 @@ -# Copyright 2016-2024 Free Software Foundation, Inc. +# Copyright 2016-2025 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,6 +17,8 @@ # watchpoints don't end up with stale locations, preventing resumption # of other inferiors. +require allow_fork_tests + standard_testfile if {[build_executable "failed to build" $testfile $srcfile {debug}]} { diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.c b/gdb/testsuite/gdb.multi/watchpoint-multi.c index 0c54144..4dd5bde 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi.c +++ b/gdb/testsuite/gdb.multi/watchpoint-multi.c @@ -1,6 +1,6 @@ /* This testcase is part of GDB, the GNU debugger. - Copyright 2012-2024 Free Software Foundation, Inc. + Copyright 2012-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp index 91e42d8..b0c8731 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp +++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp @@ -1,4 +1,4 @@ -# Copyright 2012-2024 Free Software Foundation, Inc. +# Copyright 2012-2025 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,6 +16,8 @@ standard_testfile set executable ${testfile} +require allow_multi_inferior_tests + # Multiple inferiors are needed, therefore both native and extended gdbserver # modes are supported. Only non-extended gdbserver is not supported. require !use_gdb_stub |