Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [patch/rfc] Fix non-portable test names
Date: Sun, 13 Jun 2004 19:37:00 -0000	[thread overview]
Message-ID: <40CCACEF.4090203@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 137 bytes --]

Hello,

This patch tweaks a few test cases so that the test names don't include 
inferior dependant values.

thoughts?  michaelc?
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 4069 bytes --]

2004-06-13  Andrew Cagney  <cagney@gnu.org>

	* gdb.base/gcore.exp (capture_command_output): Delete the always
	passing tests containing inferior values.
	* gdb.base/ending-run.exp: Do not include the breakpoint address
	in the test message.
	* gdb.base/sizeof.exp (check_sizeof): Do not include the type's
	size in the test name, use gdb_test_multiple.

Index: gdb.base/ending-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ending-run.exp,v
retrieving revision 1.22
diff -p -u -r1.22 ending-run.exp
--- gdb.base/ending-run.exp	7 Oct 2003 16:02:16 -0000	1.22
+++ gdb.base/ending-run.exp	13 Jun 2004 19:34:57 -0000
@@ -109,7 +109,7 @@ gdb_expect {
     -re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" {
         set line_nine $expect_out(1,string)
         gdb_test "b ending-run.c:14" ".*Breakpoint 7.*ending-run.c, line 14.*"
-        gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 8.*"
+        gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 8.*" "Breakpoint 7 at *ending-run.c:14"
         gdb_test "c" ".*Breakpoint.*7.*callee.*14.*"
         gdb_test "cle" ".*Deleted breakpoints 8 7.*" "Clear 2 by default"
     }
Index: gdb.base/gcore.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gcore.exp,v
retrieving revision 1.6
diff -p -u -r1.6 gcore.exp
--- gdb.base/gcore.exp	2 Feb 2004 05:15:27 -0000	1.6
+++ gdb.base/gcore.exp	13 Jun 2004 19:34:57 -0000
@@ -187,7 +187,6 @@ if ![string compare $pre_corefile_allreg
 
 set post_corefile_extern_array \
 	[capture_command_output "print extern_array" "$print_prefix"]
-pass "extern_array = $post_corefile_extern_array"
 if ![string compare $pre_corefile_extern_array $post_corefile_extern_array]  {
     pass "corefile restored extern array"
 } else {
@@ -196,7 +195,6 @@ if ![string compare $pre_corefile_extern
 
 set post_corefile_static_array \
 	[capture_command_output "print static_array" "$print_prefix"]
-pass "static_array = $post_corefile_static_array"
 if ![string compare $pre_corefile_static_array $post_corefile_static_array]  {
     pass "corefile restored static array"
 } else {
@@ -205,7 +203,6 @@ if ![string compare $pre_corefile_static
 
 set post_corefile_uninit_array \
 	[capture_command_output "print un_initialized_array" "$print_prefix"]
-pass "uninit_array = $post_corefile_uninit_array"
 if ![string compare $pre_corefile_uninit_array $post_corefile_uninit_array]  {
     pass "corefile restored un-initialized array"
 } else {
@@ -214,7 +211,6 @@ if ![string compare $pre_corefile_uninit
 
 set post_corefile_heap_string \
 	[capture_command_output "print heap_string" "$print_prefix"]
-pass "heap_string = $post_corefile_heap_string"
 if ![string compare $pre_corefile_heap_string $post_corefile_heap_string]  {
     pass "corefile restored heap array"
 } else {
@@ -223,7 +219,6 @@ if ![string compare $pre_corefile_heap_s
 
 set post_corefile_local_array \
 	[capture_command_output "print array_func::local_array" "$print_prefix"]
-pass "local_array = $post_corefile_local_array"
 if ![string compare $pre_corefile_local_array $post_corefile_local_array]  {
     pass "corefile restored stack array"
 } else {
Index: gdb.base/sizeof.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sizeof.exp,v
retrieving revision 1.5
diff -p -u -r1.5 sizeof.exp
--- gdb.base/sizeof.exp	30 Mar 2003 04:08:16 -0000	1.5
+++ gdb.base/sizeof.exp	13 Jun 2004 19:34:57 -0000
@@ -103,16 +103,10 @@ proc check_sizeof { type size } {
     }
 
     set pat [string_to_regexp "sizeof (${type}) == ${size}"]
-    send_gdb "next\n"
-    gdb_expect {
+    set test "check sizeof ${type}"
+    gdb_test_multiple "next" "$test" {
 	-re "${pat}\[\r\n\].*$gdb_prompt $" {
-	    pass "check sizeof ${type} == ${size}"
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "check sizeof ${type} == ${size}"
-	}
-	timeout {
-	    fail "check sizeof ${type} == ${size} (timeout)"
+	    pass "$test"
 	}
     }
 }

             reply	other threads:[~2004-06-13 19:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-13 19:37 Andrew Cagney [this message]
2004-06-14 19:04 Michael Elizabeth Chastain
2004-06-15  0:16 ` Andrew Cagney

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=40CCACEF.4090203@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /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