public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: testsuite: fix failed testcases in gdb.base/gdb-caching-proc.exp
@ 2022-03-03  3:30 Tiezhu Yang
  0 siblings, 0 replies; only message in thread
From: Tiezhu Yang @ 2022-03-03  3:30 UTC (permalink / raw)
  To: gdb-cvs

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

commit cb1a6dda0d7b14034f647fbc48a7d6a2d212db7f
Author: Tiezhu Yang <yangtiezhu@loongson.cn>
Date:   Thu Mar 3 11:15:10 2022 +0800

    gdb: testsuite: fix failed testcases in gdb.base/gdb-caching-proc.exp
    
    When execute the following command:
    
      make check-gdb TESTS="gdb.base/gdb-caching-proc.exp"
    
    we can see there exist some failed testcases:
    
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 0: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 1: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 2: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 3: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 4: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 5: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 6: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 7: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 8: can spawn for attach (got interactive prompt)
      FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 9: can spawn for attach (got interactive prompt)
    
    here are the detailed messages in gdb/testsuite/gdb.log:
    
      attach 873776
      A program is being debugged already.  Kill it? (y or n) n
      Not killed.
      (gdb) FAIL: gdb.base/gdb-caching-proc.exp: can_spawn_for_attach: 0: can spawn for attach (got interactive prompt)
    
    so handle the case "A program is being debugged already.  Kill it" in
    can_spawn_for_attach to fix the failed testcases.
    
    Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

Diff:
---
 gdb/testsuite/lib/gdb.exp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 848cd080000..a35d08a05de 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5130,6 +5130,10 @@ gdb_caching_proc can_spawn_for_attach {
           kill_wait_spawned_process $test_spawn_id
           return 1
         }
+        -re "A program is being debugged already.  Kill it. .y or n. " {
+          send_gdb "y\n"
+          exp_continue
+        }
     }
 
     kill_wait_spawned_process $test_spawn_id


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-03  3:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03  3:30 [binutils-gdb] gdb: testsuite: fix failed testcases in gdb.base/gdb-caching-proc.exp Tiezhu Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).