* [patch] Fix identical PASS in gdb.base/skip.exp
@ 2012-01-30 14:39 Yao Qi
2012-01-30 17:11 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2012-01-30 14:39 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
When I was looking at the FAILs in gdb.base/skip.exp, I found there are
some identical PASS in gdb.base/skip.exp.
2 PASS: gdb.base/skip.exp: info skip
2 PASS: gdb.base/skip.exp: skip
2 PASS: gdb.base/skip.exp: skip file
2 PASS: gdb.base/skip.exp: step after deleting 1 (1)
2 PASS: gdb.base/skip.exp: step after deleting 1 (2)
5 PASS: gdb.base/skip.exp: step
This patch is to fix this. OK to apply?
--
Yao (é½å°§)
[-- Attachment #2: 0005-make-test-PASS-unique.patch --]
[-- Type: text/x-patch, Size: 3627 bytes --]
2012-01-30 Yao Qi <yao@codesourcery.com>
* gdb.base/skip.exp: Make test result unique.
---
gdb/testsuite/gdb.base/skip.exp | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp
index 061341c..6f9f8ad 100644
--- a/gdb/testsuite/gdb.base/skip.exp
+++ b/gdb/testsuite/gdb.base/skip.exp
@@ -27,9 +27,9 @@ set srcfile1 skip1.c
#
# Right after we start gdb, there's no default file or function to skip.
#
-gdb_test "skip file" "No default file now."
+gdb_test "skip file" "No default file now." "skip (no default file)"
gdb_test "skip function" "No default function now."
-gdb_test "skip" "No default function now."
+gdb_test "skip" "No default function now." "skip (no default function)"
if ![runto_main] { fail "skip tests suppressed" }
@@ -41,8 +41,8 @@ gdb_test "info skip" "Not skipping any files or functions\." "info skip empty"
#
# Create a skiplist entry for the current file and function.
#
-gdb_test "skip file" "File .*$srcfile will be skipped when stepping\."
-gdb_test "skip" "Function main at .* will be skipped when stepping\."
+gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip ($srcfile)"
+gdb_test "skip" "Function main at .* will be skipped when stepping\." "skip (main)"
#
# Create a skiplist entry for a specified file and function.
@@ -82,7 +82,7 @@ gdb_test "info skip" \
#
if ![runto_main] { fail "skip tests suppressed" }
-gdb_test "step"
+gdb_test "step" ".*" "step into main"
gdb_test "bt" "\\s*\\#0\\s+main.*" "step after all ignored"
#
@@ -96,11 +96,12 @@ gdb_test "info skip" \
"Num\\s+Type\\s+Enb\\s+Address\\s+What\\s*
2\\s+function\\s+y\\s+0x\[0-9a-f\]+ main at .*$srcfile:\[0-9\]+\\s*
3\\s+file\\s+y\\s+.*$srcfile1\\s*
-4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*"
+4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*" \
+ "info skip (delete 1)"
if ![runto_main] { fail "skip tests suppressed" }
gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
-gdb_test "step"; # Return from foo()
+gdb_test "step" ".*" "step after deleting 1" ; # Return from foo()
gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)"
#
@@ -114,10 +115,10 @@ gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \
if ![runto_main] { fail "skip tests suppressed" }
gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)"
-gdb_test "step"; # Return from foo()
-gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (2)"
-gdb_test "step"; # Return from bar()
-gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (3)"
+gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo()
+gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)"
+gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar()
+gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)"
#
# Enable skiplist entry 3 and make sure we step over it like before.
@@ -127,9 +128,9 @@ gdb_test "skip enable 3"
gdb_test "info skip 3" ".*\\n3\\s+file\\s+y.*" \
"info skip shows entry as enabled"
if ![runto_main] { fail "skip tests suppressed" }
-gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
-gdb_test "step"; # Return from foo()
-gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)"
+gdb_test "step" "foo \\(\\) at.*" "step after enable 3 (1)"
+gdb_test "step" ".*" "step after enable 3"; # Return from foo()
+gdb_test "step" "main \\(\\) at.*" "step after enable 3 (2)"
gdb_test "skip disable"
gdb_test "info skip" \
--
1.7.0.4
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] Fix identical PASS in gdb.base/skip.exp
2012-01-30 14:39 [patch] Fix identical PASS in gdb.base/skip.exp Yao Qi
@ 2012-01-30 17:11 ` Pedro Alves
2012-01-31 1:56 ` Yao Qi
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2012-01-30 17:11 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 01/30/2012 02:30 PM, Yao Qi wrote:
> When I was looking at the FAILs in gdb.base/skip.exp, I found there are
> some identical PASS in gdb.base/skip.exp.
>
> 2 PASS: gdb.base/skip.exp: info skip
> 2 PASS: gdb.base/skip.exp: skip
> 2 PASS: gdb.base/skip.exp: skip file
> 2 PASS: gdb.base/skip.exp: step after deleting 1 (1)
> 2 PASS: gdb.base/skip.exp: step after deleting 1 (2)
> 5 PASS: gdb.base/skip.exp: step
>
> This patch is to fix this. OK to apply?
Thanks.
>
> -- Yao (é½å°§)
>
>
> 0005-make-test-PASS-unique.patch
>
>
> 2012-01-30 Yao Qi <yao@codesourcery.com>
>
> * gdb.base/skip.exp: Make test result unique.
> ---
> gdb/testsuite/gdb.base/skip.exp | 29 +++++++++++++++--------------
> 1 files changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp
> index 061341c..6f9f8ad 100644
> --- a/gdb/testsuite/gdb.base/skip.exp
> +++ b/gdb/testsuite/gdb.base/skip.exp
> @@ -27,9 +27,9 @@ set srcfile1 skip1.c
> #
> # Right after we start gdb, there's no default file or function to skip.
> #
> -gdb_test "skip file" "No default file now."
> +gdb_test "skip file" "No default file now." "skip (no default file)"
gdb_test "skip file" "No default file now." "skip file (no default file)"
> gdb_test "skip function" "No default function now."
> -gdb_test "skip" "No default function now."
> +gdb_test "skip" "No default function now." "skip (no default function)"
>
> if ![runto_main] { fail "skip tests suppressed" }
>
> @@ -41,8 +41,8 @@ gdb_test "info skip" "Not skipping any files or functions\." "info skip empty"
> #
> # Create a skiplist entry for the current file and function.
> #
> -gdb_test "skip file" "File .*$srcfile will be skipped when stepping\."
> -gdb_test "skip" "Function main at .* will be skipped when stepping\."
> +gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip ($srcfile)"
gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip file ($srcfile)"
> +gdb_test "skip" "Function main at .* will be skipped when stepping\." "skip (main)"
>
> #
> # Create a skiplist entry for a specified file and function.
> @@ -82,7 +82,7 @@ gdb_test "info skip" \
> #
>
> if ![runto_main] { fail "skip tests suppressed" }
> -gdb_test "step"
> +gdb_test "step" ".*" "step into main"
into, or in? AFAICS, you're already in main before the step.
> gdb_test "bt" "\\s*\\#0\\s+main.*" "step after all ignored"
>
> #
> @@ -96,11 +96,12 @@ gdb_test "info skip" \
> "Num\\s+Type\\s+Enb\\s+Address\\s+What\\s*
> 2\\s+function\\s+y\\s+0x\[0-9a-f\]+ main at .*$srcfile:\[0-9\]+\\s*
> 3\\s+file\\s+y\\s+.*$srcfile1\\s*
> -4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*"
> +4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*" \
> + "info skip (delete 1)"
>
> if ![runto_main] { fail "skip tests suppressed" }
> gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
> -gdb_test "step"; # Return from foo()
> +gdb_test "step" ".*" "step after deleting 1" ; # Return from foo()
> gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)"
Shouldn't that be
gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
gdb_test "step" ".*" "step after deleting 1 (2)" # Return from foo()
gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (3)"
? That is: 1, 2, 3.
>
> #
> @@ -114,10 +115,10 @@ gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \
>
> if ![runto_main] { fail "skip tests suppressed" }
> gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)"
> -gdb_test "step"; # Return from foo()
> -gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (2)"
> -gdb_test "step"; # Return from bar()
> -gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (3)"
> +gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo()
> +gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)"
> +gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar()
> +gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)"
>
> #
> # Enable skiplist entry 3 and make sure we step over it like before.
> @@ -127,9 +128,9 @@ gdb_test "skip enable 3"
> gdb_test "info skip 3" ".*\\n3\\s+file\\s+y.*" \
> "info skip shows entry as enabled"
> if ![runto_main] { fail "skip tests suppressed" }
> -gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
> -gdb_test "step"; # Return from foo()
> -gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)"
> +gdb_test "step" "foo \\(\\) at.*" "step after enable 3 (1)"
> +gdb_test "step" ".*" "step after enable 3"; # Return from foo()
> +gdb_test "step" "main \\(\\) at.*" "step after enable 3 (2)"
1, 2, 3?
Okay with those fixed.
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] Fix identical PASS in gdb.base/skip.exp
2012-01-30 17:11 ` Pedro Alves
@ 2012-01-31 1:56 ` Yao Qi
0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2012-01-31 1:56 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 2814 bytes --]
On 01/31/2012 12:21 AM, Pedro Alves wrote:
>> > -gdb_test "step"
>> > +gdb_test "step" ".*" "step into main"
> into, or in? AFAICS, you're already in main before the step.
>
OK, Change this message to "step in the main".
>> > gdb_test "bt" "\\s*\\#0\\s+main.*" "step after all ignored"
>> >
>> > #
>> > @@ -96,11 +96,12 @@ gdb_test "info skip" \
>> > "Num\\s+Type\\s+Enb\\s+Address\\s+What\\s*
>> > 2\\s+function\\s+y\\s+0x\[0-9a-f\]+ main at .*$srcfile:\[0-9\]+\\s*
>> > 3\\s+file\\s+y\\s+.*$srcfile1\\s*
>> > -4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*"
>> > +4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*" \
>> > + "info skip (delete 1)"
>> >
>> > if ![runto_main] { fail "skip tests suppressed" }
>> > gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
>> > -gdb_test "step"; # Return from foo()
>> > +gdb_test "step" ".*" "step after deleting 1" ; # Return from foo()
>> > gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)"
> Shouldn't that be
>
> gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
> gdb_test "step" ".*" "step after deleting 1 (2)" # Return from foo()
> gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (3)"
>
> ? That is: 1, 2, 3.
>
OK fixed.
>> >
>> > #
>> > @@ -114,10 +115,10 @@ gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \
>> >
>> > if ![runto_main] { fail "skip tests suppressed" }
>> > gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)"
>> > -gdb_test "step"; # Return from foo()
>> > -gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (2)"
>> > -gdb_test "step"; # Return from bar()
>> > -gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (3)"
>> > +gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo()
>> > +gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)"
>> > +gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar()
>> > +gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)"
>> >
>> > #
>> > # Enable skiplist entry 3 and make sure we step over it like before.
>> > @@ -127,9 +128,9 @@ gdb_test "skip enable 3"
>> > gdb_test "info skip 3" ".*\\n3\\s+file\\s+y.*" \
>> > "info skip shows entry as enabled"
>> > if ![runto_main] { fail "skip tests suppressed" }
>> > -gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
>> > -gdb_test "step"; # Return from foo()
>> > -gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)"
>> > +gdb_test "step" "foo \\(\\) at.*" "step after enable 3 (1)"
>> > +gdb_test "step" ".*" "step after enable 3"; # Return from foo()
>> > +gdb_test "step" "main \\(\\) at.*" "step after enable 3 (2)"
> 1, 2, 3?
>
Fixed.
> Okay with those fixed.
The patch here is what I committed.
--
Yao (é½å°§)
[-- Attachment #2: 0005-make-test-PASS-unique.patch --]
[-- Type: text/x-patch, Size: 3777 bytes --]
2012-01-30 Yao Qi <yao@codesourcery.com>
* gdb.base/skip.exp: Make test result unique.
---
gdb/testsuite/gdb.base/skip.exp | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp
index 061341c..5cb1424 100644
--- a/gdb/testsuite/gdb.base/skip.exp
+++ b/gdb/testsuite/gdb.base/skip.exp
@@ -27,9 +27,9 @@ set srcfile1 skip1.c
#
# Right after we start gdb, there's no default file or function to skip.
#
-gdb_test "skip file" "No default file now."
+gdb_test "skip file" "No default file now." "skip file (no default file)"
gdb_test "skip function" "No default function now."
-gdb_test "skip" "No default function now."
+gdb_test "skip" "No default function now." "skip (no default function)"
if ![runto_main] { fail "skip tests suppressed" }
@@ -41,8 +41,8 @@ gdb_test "info skip" "Not skipping any files or functions\." "info skip empty"
#
# Create a skiplist entry for the current file and function.
#
-gdb_test "skip file" "File .*$srcfile will be skipped when stepping\."
-gdb_test "skip" "Function main at .* will be skipped when stepping\."
+gdb_test "skip file" "File .*$srcfile will be skipped when stepping\." "skip file ($srcfile)"
+gdb_test "skip" "Function main at .* will be skipped when stepping\." "skip (main)"
#
# Create a skiplist entry for a specified file and function.
@@ -82,7 +82,7 @@ gdb_test "info skip" \
#
if ![runto_main] { fail "skip tests suppressed" }
-gdb_test "step"
+gdb_test "step" ".*" "step in the main"
gdb_test "bt" "\\s*\\#0\\s+main.*" "step after all ignored"
#
@@ -96,12 +96,13 @@ gdb_test "info skip" \
"Num\\s+Type\\s+Enb\\s+Address\\s+What\\s*
2\\s+function\\s+y\\s+0x\[0-9a-f\]+ main at .*$srcfile:\[0-9\]+\\s*
3\\s+file\\s+y\\s+.*$srcfile1\\s*
-4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*"
+4\\s+function\\s+y\\s+0x\[0-9a-f\]+ baz at .*$srcfile1:\[0-9\]+\\s*" \
+ "info skip (delete 1)"
if ![runto_main] { fail "skip tests suppressed" }
gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
-gdb_test "step"; # Return from foo()
-gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)"
+gdb_test "step" ".*" "step after deleting 1 (2)" ; # Return from foo()
+gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (3)"
#
# Now disable the skiplist entry for skip1.c. We should now
@@ -114,10 +115,10 @@ gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \
if ![runto_main] { fail "skip tests suppressed" }
gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)"
-gdb_test "step"; # Return from foo()
-gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (2)"
-gdb_test "step"; # Return from bar()
-gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (3)"
+gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo()
+gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)"
+gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar()
+gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)"
#
# Enable skiplist entry 3 and make sure we step over it like before.
@@ -127,9 +128,9 @@ gdb_test "skip enable 3"
gdb_test "info skip 3" ".*\\n3\\s+file\\s+y.*" \
"info skip shows entry as enabled"
if ![runto_main] { fail "skip tests suppressed" }
-gdb_test "step" "foo \\(\\) at.*" "step after deleting 1 (1)"
-gdb_test "step"; # Return from foo()
-gdb_test "step" "main \\(\\) at.*" "step after deleting 1 (2)"
+gdb_test "step" "foo \\(\\) at.*" "step after enable 3 (1)"
+gdb_test "step" ".*" "step after enable 3 (2)"; # Return from foo()
+gdb_test "step" "main \\(\\) at.*" "step after enable 3 (3)"
gdb_test "skip disable"
gdb_test "info skip" \
--
1.7.0.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-30 23:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-30 14:39 [patch] Fix identical PASS in gdb.base/skip.exp Yao Qi
2012-01-30 17:11 ` Pedro Alves
2012-01-31 1:56 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox