* [PATCH] Add -nx for "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp
@ 2012-09-01 15:00 Khoo Yit Phang
2012-09-03 2:40 ` Khoo Yit Phang
0 siblings, 1 reply; 5+ messages in thread
From: Khoo Yit Phang @ 2012-09-01 15:00 UTC (permalink / raw)
To: GDB Patches; +Cc: Khoo Yit Phang
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
Hi,
The "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp was giving me spurious results since it was loading ~/.gdbinit. Here's a patch that adds the -nx option to prevent this problem.
Thanks,
Yit
September 1, 2012
[-- Attachment #2: xgdb-no-init.txt --]
[-- Type: text/plain, Size: 763 bytes --]
gdb/ChangeLog:
2012-09-01 Khoo Yit Phang <khooyp@cs.umd.edu>
Add -nx option to "xgdb" test to prevent spurious results
due to ~/.gdbinit.
* testsuite/gdb.gdb/selftest.exp: (run until breakpoint at
captured_main) Add -nx option.
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -303,7 +303,7 @@
set timeout 600
set description "run until breakpoint at captured_main"
- gdb_test_multiple "run -nw" "$description" {
+ gdb_test_multiple "run -nw -nx" "$description" {
-re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" {
pass "$description"
}
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Add -nx for "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp 2012-09-01 15:00 [PATCH] Add -nx for "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp Khoo Yit Phang @ 2012-09-03 2:40 ` Khoo Yit Phang 2012-09-06 17:09 ` Khoo Yit Phang 2012-09-07 16:49 ` Jan Kratochvil 0 siblings, 2 replies; 5+ messages in thread From: Khoo Yit Phang @ 2012-09-03 2:40 UTC (permalink / raw) To: Khoo Yit Phang; +Cc: GDB Patches [-- Attachment #1: Type: text/plain, Size: 142 bytes --] Hi, I found a few more tests with the same issue, here's an updated patch that covers those tests. Thanks, Yit September 2, 2012 [-- Attachment #2: xgdb-no-init.txt --] [-- Type: text/plain, Size: 2609 bytes --] Add -nx option to "xgdb" test to prevent spurious results due to ~/.gdbinit. gdb/testsuite/ChangeLog 2012-09-02 Khoo Yit Phang <khooyp@cs.umd.edu> Add -nx option to "xgdb" tests to avoid spurious results due to ~/.gdbinit. * gdb.gdb/complaint.exp (setup_test): Add -nx option to run command. * gdb.gdb/observer.exp (setup_test): Ditto. * gdb.gdb/selftest.exp (test_with_self): Ditto. * gdb.gdb/xfullpath.exp (setup_test): Ditto. diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp --- a/gdb/testsuite/gdb.gdb/complaints.exp +++ b/gdb/testsuite/gdb.gdb/complaints.exp @@ -73,7 +73,7 @@ set timeout 600 set description "run until breakpoint at captured_command_loop" - gdb_test_multiple "run -nw" "$description" { + gdb_test_multiple "run -nw -nx" "$description" { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_command_loop .data.* at .*main.c:.*$gdb_prompt $" { pass "$description" } diff --git a/gdb/testsuite/gdb.gdb/observer.exp b/gdb/testsuite/gdb.gdb/observer.exp --- a/gdb/testsuite/gdb.gdb/observer.exp +++ b/gdb/testsuite/gdb.gdb/observer.exp @@ -67,7 +67,7 @@ set timeout 600 set description "run until breakpoint at captured_main" - gdb_test_multiple "run -nw" "$description" { + gdb_test_multiple "run -nw -nx" "$description" { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" { pass "$description" } diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -303,7 +303,7 @@ set timeout 600 set description "run until breakpoint at captured_main" - gdb_test_multiple "run -nw" "$description" { + gdb_test_multiple "run -nw -nx" "$description" { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" { pass "$description" } diff --git a/gdb/testsuite/gdb.gdb/xfullpath.exp b/gdb/testsuite/gdb.gdb/xfullpath.exp --- a/gdb/testsuite/gdb.gdb/xfullpath.exp +++ b/gdb/testsuite/gdb.gdb/xfullpath.exp @@ -67,7 +67,7 @@ set timeout 600 set description "run until breakpoint at captured_main" - gdb_test_multiple "run -nw" "$description" { + gdb_test_multiple "run -nw -nx" "$description" { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" { pass "$description" } [-- Attachment #3: Type: text/plain, Size: 330 bytes --] On Sep 1, 2012, at 11:00 AM, Khoo Yit Phang wrote: > Hi, > > The "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp was giving me spurious results since it was loading ~/.gdbinit. Here's a patch that adds the -nx option to prevent this problem. > > Thanks, > > Yit > September 1, 2012 > > <xgdb-no-init.txt> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Add -nx for "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp 2012-09-03 2:40 ` Khoo Yit Phang @ 2012-09-06 17:09 ` Khoo Yit Phang 2012-09-07 16:49 ` Jan Kratochvil 1 sibling, 0 replies; 5+ messages in thread From: Khoo Yit Phang @ 2012-09-06 17:09 UTC (permalink / raw) To: Khoo Yit Phang; +Cc: GDB Patches Hi, Ping. Any issues with this patch? Thanks, Yit September 6, 2012 On Sep 2, 2012, at 10:40 PM, Khoo Yit Phang wrote: > Hi, > > I found a few more tests with the same issue, here's an updated patch that covers those tests. > > Thanks, > > Yit > September 2, 2012 > > <xgdb-no-init.txt> > > On Sep 1, 2012, at 11:00 AM, Khoo Yit Phang wrote: > >> Hi, >> >> The "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp was giving me spurious results since it was loading ~/.gdbinit. Here's a patch that adds the -nx option to prevent this problem. >> >> Thanks, >> >> Yit >> September 1, 2012 >> >> <xgdb-no-init.txt> > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Add -nx for "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp 2012-09-03 2:40 ` Khoo Yit Phang 2012-09-06 17:09 ` Khoo Yit Phang @ 2012-09-07 16:49 ` Jan Kratochvil 2012-09-07 19:27 ` Khoo Yit Phang 1 sibling, 1 reply; 5+ messages in thread From: Jan Kratochvil @ 2012-09-07 16:49 UTC (permalink / raw) To: Khoo Yit Phang; +Cc: GDB Patches Hi Yit, On Mon, 03 Sep 2012 04:40:27 +0200, Khoo Yit Phang wrote: > I found a few more tests with the same issue, here's an updated patch that > covers those tests. I am fine with checking in the patch if one can replace that '-nw -nx' by $INTERNAL_GDBFLAGS instead. If it does not work please reply here. Thanks, Jan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Add -nx for "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp 2012-09-07 16:49 ` Jan Kratochvil @ 2012-09-07 19:27 ` Khoo Yit Phang 0 siblings, 0 replies; 5+ messages in thread From: Khoo Yit Phang @ 2012-09-07 19:27 UTC (permalink / raw) To: Jan Kratochvil; +Cc: Khoo Yit Phang, GDB Patches [-- Attachment #1: Type: text/plain, Size: 588 bytes --] Hi Jan, (Sorry for the resend yet again; one day, I'll get the hang this.) On Sep 7, 2012, at 12:49 PM, Jan Kratochvil wrote: > > On Mon, 03 Sep 2012 04:40:27 +0200, Khoo Yit Phang wrote: >> I found a few more tests with the same issue, here's an updated patch that >> covers those tests. > > I am fine with checking in the patch if one can replace that '-nw -nx' by > $INTERNAL_GDBFLAGS instead. If it does not work please reply here. Ah, thanks for the info, and it works. I'll check in the updated patch later today, barring any issues. Yit September 7, 2012 [-- Attachment #2: xgdb-no-init.txt --] [-- Type: text/plain, Size: 3722 bytes --] Replace -nw option with $INTERNAL_GDBFLAGS in "xgdb" tests to avoid spurious results due to ~/.gdbinit. gdb/testsuite/ChangeLog 2012-09-02 Khoo Yit Phang <khooyp@cs.umd.edu> Replace -nw option with $INTERNAL_GDBFLAGS in "xgdb" tests to avoid spurious results due to ~/.gdbinit. * gdb.gdb/complaint.exp (setup_test): Replace -nw option with $INTERNAL_GDBFLAGS in run command. * gdb.gdb/observer.exp (setup_test): Ditto. * gdb.gdb/selftest.exp (test_with_self): Ditto. * gdb.gdb/xfullpath.exp (setup_test): Ditto. diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp --- a/gdb/testsuite/gdb.gdb/complaints.exp +++ b/gdb/testsuite/gdb.gdb/complaints.exp @@ -31,6 +31,7 @@ proc setup_test { executable } { global gdb_prompt global timeout + global INTERNAL_GDBFLAGS # load yourself into the debugger # This can take a relatively long time, particularly for testing where @@ -73,7 +74,7 @@ set timeout 600 set description "run until breakpoint at captured_command_loop" - gdb_test_multiple "run -nw" "$description" { + gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_command_loop .data.* at .*main.c:.*$gdb_prompt $" { pass "$description" } diff --git a/gdb/testsuite/gdb.gdb/observer.exp b/gdb/testsuite/gdb.gdb/observer.exp --- a/gdb/testsuite/gdb.gdb/observer.exp +++ b/gdb/testsuite/gdb.gdb/observer.exp @@ -25,6 +25,7 @@ proc setup_test { executable } { global gdb_prompt global timeout + global INTERNAL_GDBFLAGS # load yourself into the debugger # This can take a relatively long time, particularly for testing where @@ -67,7 +68,7 @@ set timeout 600 set description "run until breakpoint at captured_main" - gdb_test_multiple "run -nw" "$description" { + gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" { pass "$description" } diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -242,6 +242,7 @@ global det_file global decimal global timeout + global INTERNAL_GDBFLAGS # load yourself into the debugger # This can take a relatively long time, particularly for testing where @@ -303,7 +304,7 @@ set timeout 600 set description "run until breakpoint at captured_main" - gdb_test_multiple "run -nw" "$description" { + gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" { pass "$description" } diff --git a/gdb/testsuite/gdb.gdb/xfullpath.exp b/gdb/testsuite/gdb.gdb/xfullpath.exp --- a/gdb/testsuite/gdb.gdb/xfullpath.exp +++ b/gdb/testsuite/gdb.gdb/xfullpath.exp @@ -25,6 +25,7 @@ proc setup_test { executable } { global gdb_prompt global timeout + global INTERNAL_GDBFLAGS # load yourself into the debugger # This can take a relatively long time, particularly for testing where @@ -67,7 +68,7 @@ set timeout 600 set description "run until breakpoint at captured_main" - gdb_test_multiple "run -nw" "$description" { + gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" { -re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" { pass "$description" } [-- Attachment #3: Type: text/plain, Size: 1 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-07 19:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-09-01 15:00 [PATCH] Add -nx for "xgdb" test in gdb/testsuite/gdb.gdb/selftest.exp Khoo Yit Phang 2012-09-03 2:40 ` Khoo Yit Phang 2012-09-06 17:09 ` Khoo Yit Phang 2012-09-07 16:49 ` Jan Kratochvil 2012-09-07 19:27 ` Khoo Yit Phang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox