Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] re-initialize height to 0 during setshow.exp
@ 2007-04-02 14:57 Denis PILAT
  2007-04-02 17:56 ` Michael Snyder
  0 siblings, 1 reply; 7+ messages in thread
From: Denis PILAT @ 2007-04-02 14:57 UTC (permalink / raw)
  To: gdb-patches

In testsuite/gdb.base/setshow.exp, after "set height 100", it could 
occur that following commands require user interaction to proceed like:
---Type <return> to continue, or q <return> to quit---
(At least it's the case for our gdb in "show user" since we have defined 
a lot of user command.)

Attach is a patch that fixes a problem in this test.
We could also add
    gdb_test "set height 0" "" "set height 0"
or increase the height to a very large number, but I prefer to reset 
height to 0 like done in gdb.exp.

-- 
Denis

2007-04-02  Denis Pilat  <denis.pilat@st.com>

	* gdb.base/setshow.exp: Reset height to 0 after having set it to 100.

Index: testsuite/gdb.base/setshow.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/setshow.exp,v
retrieving revision 1.5
diff -u -p -r1.5 setshow.exp
--- testsuite/gdb.base/setshow.exp      9 Jan 2007 17:59:11 -0000       1.5
+++ testsuite/gdb.base/setshow.exp      2 Apr 2007 14:46:58 -0000
@@ -155,6 +155,16 @@ gdb_test "show environment FOOBARBAZ" "F
 gdb_test "set height 100" "" "set height 100"
 #test show height 100
 gdb_test "show height" "Number of lines gdb thinks are in a page is 100..*" "show height"
+
+# back to infinite height to avoid pagers
+send_gdb "set height 0\n"
+    gdb_expect 10 {
+    -re "$gdb_prompt $" {}
+    timeout {
+        warning "Couldn't set the height to 0"
+    }
+}
+
 #test set history expansion on
 gdb_test "set history expansion on" "" "set history expansion on"
 #test show history expansion on



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFA] re-initialize height to 0 during setshow.exp
  2007-04-02 14:57 [RFA] re-initialize height to 0 during setshow.exp Denis PILAT
@ 2007-04-02 17:56 ` Michael Snyder
  2007-04-03 13:26   ` Denis PILAT
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Snyder @ 2007-04-02 17:56 UTC (permalink / raw)
  To: Denis PILAT; +Cc: gdb-patches

On Mon, 2007-04-02 at 16:57 +0200, Denis PILAT wrote:
> In testsuite/gdb.base/setshow.exp, after "set height 100", it could 
> occur that following commands require user interaction to proceed like:
> ---Type <return> to continue, or q <return> to quit---
> (At least it's the case for our gdb in "show user" since we have defined 
> a lot of user command.)
> 
> Attach is a patch that fixes a problem in this test.
> We could also add
>     gdb_test "set height 0" "" "set height 0"
> or increase the height to a very large number, but I prefer to reset 
> height to 0 like done in gdb.exp.
> 

I think it's valid, but I wonder why you didn't just use gdb_test,
instead of gdb_expect?  Are you expecting the command to fail or
time out or something?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFA] re-initialize height to 0 during setshow.exp
  2007-04-02 17:56 ` Michael Snyder
@ 2007-04-03 13:26   ` Denis PILAT
  2007-04-03 14:34     ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Denis PILAT @ 2007-04-03 13:26 UTC (permalink / raw)
  To: gdb-patches

Michael Snyder wrote:
> On Mon, 2007-04-02 at 16:57 +0200, Denis PILAT wrote:
>   
>> In testsuite/gdb.base/setshow.exp, after "set height 100", it could 
>> occur that following commands require user interaction to proceed like:
>> ---Type <return> to continue, or q <return> to quit---
>> (At least it's the case for our gdb in "show user" since we have defined 
>> a lot of user command.)
>>
>> Attach is a patch that fixes a problem in this test.
>> We could also add
>>     gdb_test "set height 0" "" "set height 0"
>> or increase the height to a very large number, but I prefer to reset 
>> height to 0 like done in gdb.exp.
>>
>>     
>
> I think it's valid, but I wonder why you didn't just use gdb_test,
> instead of gdb_expect?  Are you expecting the command to fail or
> time out or something?
>
>
>   
It just because gdb_test will add a new test, and I just want to fix a
problem.
But it would be much simpler to add *gdb_test "set height 0" "" "set
height 0"*
It was much RFC I should I put in my title,

Any more opinion ?
-- 
Denis


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFA] re-initialize height to 0 during setshow.exp
  2007-04-03 13:26   ` Denis PILAT
@ 2007-04-03 14:34     ` Daniel Jacobowitz
  2007-04-03 14:53       ` Denis PILAT
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-04-03 14:34 UTC (permalink / raw)
  To: Denis PILAT; +Cc: gdb-patches

On Tue, Apr 03, 2007 at 03:26:32PM +0200, Denis PILAT wrote:
> It just because gdb_test will add a new test, and I just want to fix a
> problem.
> But it would be much simpler to add *gdb_test "set height 0" "" "set
> height 0"*
> It was much RFC I should I put in my title,

Please always use gdb_test.  If you don't want it to be a test, use ""
for the test name - it won't be counted (at least, not unless someting
goes wrong).

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFA] re-initialize height to 0 during setshow.exp
  2007-04-03 14:34     ` Daniel Jacobowitz
@ 2007-04-03 14:53       ` Denis PILAT
  2007-04-10 15:14         ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Denis PILAT @ 2007-04-03 14:53 UTC (permalink / raw)
  To: drow, gdb-patches

Daniel Jacobowitz wrote:
> Please always use gdb_test.  If you don't want it to be a test, use ""
> for the test name - it won't be counted (at least, not unless someting
> goes wrong).
>
>   
I didn't know this possibility.
Here is the new patch, OK for commit ?

-- 
Denis


2007-04-03  Denis Pilat  <denis.pilat@st.com>

	* gdb.base/setshow.exp: Reset height after having set it to 100.

Index: gdb/testsuite/gdb.base/setshow.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/setshow.exp,v
retrieving revision 1.5
diff -u -p -r1.5 setshow.exp
--- gdb/testsuite/gdb.base/setshow.exp  9 Jan 2007 17:59:11 -0000       1.5
+++ gdb/testsuite/gdb.base/setshow.exp  3 Apr 2007 14:50:13 -0000
@@ -155,6 +155,8 @@ gdb_test "show environment FOOBARBAZ" "F
 gdb_test "set height 100" "" "set height 100"
 #test show height 100
 gdb_test "show height" "Number of lines gdb thinks are in a page is 100..*" "show height"
+# back to infinite height to avoid pagers
+gdb_test "set height 0" "" ""
 #test set history expansion on
 gdb_test "set history expansion on" "" "set history expansion on"
 #test show history expansion on



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFA] re-initialize height to 0 during setshow.exp
  2007-04-03 14:53       ` Denis PILAT
@ 2007-04-10 15:14         ` Daniel Jacobowitz
  2007-04-16 13:50           ` Denis PILAT
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-04-10 15:14 UTC (permalink / raw)
  To: Denis PILAT; +Cc: gdb-patches

On Tue, Apr 03, 2007 at 04:52:55PM +0200, Denis PILAT wrote:
> Daniel Jacobowitz wrote:
> > Please always use gdb_test.  If you don't want it to be a test, use ""
> > for the test name - it won't be counted (at least, not unless someting
> > goes wrong).
> >
> >   
> I didn't know this possibility.
> Here is the new patch, OK for commit ?

This is OK.  Thanks!

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFA] re-initialize height to 0 during setshow.exp
  2007-04-10 15:14         ` Daniel Jacobowitz
@ 2007-04-16 13:50           ` Denis PILAT
  0 siblings, 0 replies; 7+ messages in thread
From: Denis PILAT @ 2007-04-16 13:50 UTC (permalink / raw)
  To: gdb-patches

Daniel Jacobowitz wrote:
> On Tue, Apr 03, 2007 at 04:52:55PM +0200, Denis PILAT wrote:
>   
>> Daniel Jacobowitz wrote:
>>     
>>> Please always use gdb_test.  If you don't want it to be a test, use ""
>>> for the test name - it won't be counted (at least, not unless someting
>>> goes wrong).
>>>
>>>   
>>>       
>> I didn't know this possibility.
>> Here is the new patch, OK for commit ?
>>     
>
> This is OK.  Thanks!
>
>   
Just committed.

-- 
Denis
P.S. Sorry I just think I could have committed all at once ...


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-04-16 12:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-02 14:57 [RFA] re-initialize height to 0 during setshow.exp Denis PILAT
2007-04-02 17:56 ` Michael Snyder
2007-04-03 13:26   ` Denis PILAT
2007-04-03 14:34     ` Daniel Jacobowitz
2007-04-03 14:53       ` Denis PILAT
2007-04-10 15:14         ` Daniel Jacobowitz
2007-04-16 13:50           ` Denis PILAT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox