Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC/PATCH] gdb.base/completion.exp
@ 2001-05-09 21:12 Elena Zannoni
  2001-05-10  6:20 ` Fernando Nasser
  0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2001-05-09 21:12 UTC (permalink / raw)
  To: gdb-patches

This patch revamps completion.exp. It was running only on HPUX, but I
don't see why it should be that way.

I am probably overlooking something.

Anyway, this works on solaris 2.5.1.  If we make this test run always,
there is less of a chance that it will suffer further bit rot.

We can add more tests when Eli's patch gets committed.

Comments?

Elena

2001-05-10  Elena Zannoni  <ezannoni@redhat.com>

	* gdb.base/completion.exp: Revamp test. Make it execute on all
 	platforms.


Index: completion.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/completion.exp,v
retrieving revision 1.2
diff -u -p -r1.2 completion.exp
--- completion.exp	2001/03/06 08:21:50	1.2
+++ completion.exp	2001/05/10 04:11:05
@@ -52,11 +52,6 @@ if $tracelevel then {
         }
 
 
-if { ![istarget "hppa*-hp-hpux*"] } {
-    #skip all these tests for now (FIXME)
-    continue
-}
-
 global usestubs
 
 #
@@ -379,7 +374,7 @@ gdb_expect {
     -re "^p 'a\\\x07$" {
 	send_gdb "\t"
 	gdb_expect {
-	    -re "a64l.*atol.*$gdb_prompt p .a$" {
+	    -re "a64l.*argv.*$gdb_prompt p .a$" {
 		send_gdb "\n"
 		gdb_expect {
 		    -re "Invalid character constant\\..*$gdb_prompt $" {
@@ -439,7 +434,7 @@ gdb_expect {
     -re "^p b-a\\\x07$" {
 	send_gdb "\t"
 	gdb_expect {
-	    -re "a64l.*atol.*$gdb_prompt p b-a$" {
+	    -re "a64l.*argv.*$gdb_prompt p b-a$" {
 		send_gdb "\n"
 		gdb_expect {
 		    -re "No symbol \"b\" in current context\\..*$gdb_prompt $" {
@@ -533,10 +528,10 @@ gdb_expect  {
         }
 
 
-send_gdb "file ${srcdir}/gdb.base/self\t"
+send_gdb "file ${srcdir}/gdb.base/compl\t"
 sleep 1
 gdb_expect  {
-        -re "^file ${srcdir}/gdb.base/.*'selftest\\.exp' $"\
+        -re "^file ${srcdir}/gdb.base/completion\\.exp $"\
             { send_gdb "\n"
               gdb_expect {
                       -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"
@@ -544,20 +539,19 @@ gdb_expect  {
                       { send_gdb "n\n"
                         gdb_expect {
                                 -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
-                                        { pass "complete 'file gdb.base/self'"}
-                                -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/self'"}
-                                timeout           {fail "(timeout) complete 'file gdb.base/self'"}
+                                        { pass "complete 'file gdb.base/compl'"}
+                                -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
+                                timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
                                }
                       }
-                      -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/self'"}
-                      timeout           {fail "(timeout) complete 'file gdb.base/self'"}
+                      -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
+                      timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
                      }
             }
-        -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/self'" }
-        timeout         { fail "(timeout) complete 'file gdb.base/self'" }
+        -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/compl'" }
+        timeout         { fail "(timeout) complete 'file gdb.base/compl'" }
         }
 
-
 send_gdb "info func mark\t"
 sleep 1
 gdb_expect  {
@@ -569,7 +563,7 @@ gdb_expect  {
                       -re "marker1.*$gdb_prompt info func marker$"\
                       { send_gdb "\n"
                         gdb_expect {
-                                -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(.*\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long\\);\r\n$gdb_prompt $"\
+                                -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);\r\n$gdb_prompt $"\
                                                   { pass "complete 'info func mar'"}
                                 -re ".*$gdb_prompt $" { fail "complete 'info func mar'"}
                                 timeout           {fail "(timeout) complete 'info func mar'"}
@@ -590,7 +584,7 @@ gdb_expect  {
         -re "ask.*child.*parent.*$gdb_prompt set follow-fork-mode $"\
             { send_gdb "\n"
               gdb_expect {
-                      -re "Requires an argument.*parent.*child.*ask.*$gdb_prompt $"\
+                      -re "Requires an argument.*ask.*child.*parent.*$gdb_prompt $"\
                                         { pass "complete 'set follow-fork-mode'"}
                       -re "Ambiguous item \"\"\\..*$gdb_prompt $"\
                                         { pass "complete 'set follow-fork-mode'"}


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

* Re: [RFC/PATCH] gdb.base/completion.exp
  2001-05-09 21:12 [RFC/PATCH] gdb.base/completion.exp Elena Zannoni
@ 2001-05-10  6:20 ` Fernando Nasser
  2001-05-10 14:15   ` Elena Zannoni
  0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2001-05-10  6:20 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: gdb-patches

Elena Zannoni wrote:
> 
> This patch revamps completion.exp. It was running only on HPUX, but I
> don't see why it should be that way.
> 
> I am probably overlooking something.
> 
> Anyway, this works on solaris 2.5.1.  If we make this test run always,
> there is less of a chance that it will suffer further bit rot.
> 
> We can add more tests when Eli's patch gets committed.
> 
> Comments?
> 
> Elena
> 

I agree with you.  It should work everywhere, this is not a system
dependent feature.

Fernando


> 2001-05-10  Elena Zannoni  <ezannoni@redhat.com>
> 
>         * gdb.base/completion.exp: Revamp test. Make it execute on all
>         platforms.
> 
> Index: completion.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/completion.exp,v
> retrieving revision 1.2
> diff -u -p -r1.2 completion.exp
> --- completion.exp      2001/03/06 08:21:50     1.2
> +++ completion.exp      2001/05/10 04:11:05
> @@ -52,11 +52,6 @@ if $tracelevel then {
>          }
> 
> 
> -if { ![istarget "hppa*-hp-hpux*"] } {
> -    #skip all these tests for now (FIXME)
> -    continue
> -}
> -
>  global usestubs
> 
>  #
> @@ -379,7 +374,7 @@ gdb_expect {
>      -re "^p 'a\\\x07$" {
>         send_gdb "\t"
>         gdb_expect {
> -           -re "a64l.*atol.*$gdb_prompt p .a$" {
> +           -re "a64l.*argv.*$gdb_prompt p .a$" {
>                 send_gdb "\n"
>                 gdb_expect {
>                     -re "Invalid character constant\\..*$gdb_prompt $" {
> @@ -439,7 +434,7 @@ gdb_expect {
>      -re "^p b-a\\\x07$" {
>         send_gdb "\t"
>         gdb_expect {
> -           -re "a64l.*atol.*$gdb_prompt p b-a$" {
> +           -re "a64l.*argv.*$gdb_prompt p b-a$" {
>                 send_gdb "\n"
>                 gdb_expect {
>                     -re "No symbol \"b\" in current context\\..*$gdb_prompt $" {
> @@ -533,10 +528,10 @@ gdb_expect  {
>          }
> 
> 
> -send_gdb "file ${srcdir}/gdb.base/self\t"
> +send_gdb "file ${srcdir}/gdb.base/compl\t"
>  sleep 1
>  gdb_expect  {
> -        -re "^file ${srcdir}/gdb.base/.*'selftest\\.exp' $"\
> +        -re "^file ${srcdir}/gdb.base/completion\\.exp $"\
>              { send_gdb "\n"
>                gdb_expect {
>                        -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"
> @@ -544,20 +539,19 @@ gdb_expect  {
>                        { send_gdb "n\n"
>                          gdb_expect {
>                                  -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
> -                                        { pass "complete 'file gdb.base/self'"}
> -                                -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/self'"}
> -                                timeout           {fail "(timeout) complete 'file gdb.base/self'"}
> +                                        { pass "complete 'file gdb.base/compl'"}
> +                                -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
> +                                timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
>                                 }
>                        }
> -                      -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/self'"}
> -                      timeout           {fail "(timeout) complete 'file gdb.base/self'"}
> +                      -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
> +                      timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
>                       }
>              }
> -        -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/self'" }
> -        timeout         { fail "(timeout) complete 'file gdb.base/self'" }
> +        -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/compl'" }
> +        timeout         { fail "(timeout) complete 'file gdb.base/compl'" }
>          }
> 
> -
>  send_gdb "info func mark\t"
>  sleep 1
>  gdb_expect  {
> @@ -569,7 +563,7 @@ gdb_expect  {
>                        -re "marker1.*$gdb_prompt info func marker$"\
>                        { send_gdb "\n"
>                          gdb_expect {
> -                                -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(.*\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long\\);\r\n$gdb_prompt $"\
> +                                -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);\r\n$gdb_prompt $"\
>                                                    { pass "complete 'info func mar'"}
>                                  -re ".*$gdb_prompt $" { fail "complete 'info func mar'"}
>                                  timeout           {fail "(timeout) complete 'info func mar'"}
> @@ -590,7 +584,7 @@ gdb_expect  {
>          -re "ask.*child.*parent.*$gdb_prompt set follow-fork-mode $"\
>              { send_gdb "\n"
>                gdb_expect {
> -                      -re "Requires an argument.*parent.*child.*ask.*$gdb_prompt $"\
> +                      -re "Requires an argument.*ask.*child.*parent.*$gdb_prompt $"\
>                                          { pass "complete 'set follow-fork-mode'"}
>                        -re "Ambiguous item \"\"\\..*$gdb_prompt $"\
>                                          { pass "complete 'set follow-fork-mode'"}

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

* Re: [RFC/PATCH] gdb.base/completion.exp
  2001-05-10  6:20 ` Fernando Nasser
@ 2001-05-10 14:15   ` Elena Zannoni
  2001-05-10 14:23     ` Fernando Nasser
  0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2001-05-10 14:15 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: Elena Zannoni, gdb-patches

Fernando Nasser writes:
 > Elena Zannoni wrote:
 > > 
 > > This patch revamps completion.exp. It was running only on HPUX, but I
 > > don't see why it should be that way.
 > > 
 > > I am probably overlooking something.
 > > 
 > > Anyway, this works on solaris 2.5.1.  If we make this test run always,
 > > there is less of a chance that it will suffer further bit rot.
 > > 
 > > We can add more tests when Eli's patch gets committed.
 > > 
 > > Comments?
 > > 
 > > Elena
 > > 
 > 
 > I agree with you.  It should work everywhere, this is not a system
 > dependent feature.
 > 
 > Fernando
 > 

Ok to check this in, then?

Elena


 > 
 > > 2001-05-10  Elena Zannoni  <ezannoni@redhat.com>
 > > 
 > >         * gdb.base/completion.exp: Revamp test. Make it execute on all
 > >         platforms.
 > > 
 > > Index: completion.exp
 > > ===================================================================
 > > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/completion.exp,v
 > > retrieving revision 1.2
 > > diff -u -p -r1.2 completion.exp
 > > --- completion.exp      2001/03/06 08:21:50     1.2
 > > +++ completion.exp      2001/05/10 04:11:05
 > > @@ -52,11 +52,6 @@ if $tracelevel then {
 > >          }
 > > 
 > > 
 > > -if { ![istarget "hppa*-hp-hpux*"] } {
 > > -    #skip all these tests for now (FIXME)
 > > -    continue
 > > -}
 > > -
 > >  global usestubs
 > > 
 > >  #
 > > @@ -379,7 +374,7 @@ gdb_expect {
 > >      -re "^p 'a\\\x07$" {
 > >         send_gdb "\t"
 > >         gdb_expect {
 > > -           -re "a64l.*atol.*$gdb_prompt p .a$" {
 > > +           -re "a64l.*argv.*$gdb_prompt p .a$" {
 > >                 send_gdb "\n"
 > >                 gdb_expect {
 > >                     -re "Invalid character constant\\..*$gdb_prompt $" {
 > > @@ -439,7 +434,7 @@ gdb_expect {
 > >      -re "^p b-a\\\x07$" {
 > >         send_gdb "\t"
 > >         gdb_expect {
 > > -           -re "a64l.*atol.*$gdb_prompt p b-a$" {
 > > +           -re "a64l.*argv.*$gdb_prompt p b-a$" {
 > >                 send_gdb "\n"
 > >                 gdb_expect {
 > >                     -re "No symbol \"b\" in current context\\..*$gdb_prompt $" {
 > > @@ -533,10 +528,10 @@ gdb_expect  {
 > >          }
 > > 
 > > 
 > > -send_gdb "file ${srcdir}/gdb.base/self\t"
 > > +send_gdb "file ${srcdir}/gdb.base/compl\t"
 > >  sleep 1
 > >  gdb_expect  {
 > > -        -re "^file ${srcdir}/gdb.base/.*'selftest\\.exp' $"\
 > > +        -re "^file ${srcdir}/gdb.base/completion\\.exp $"\
 > >              { send_gdb "\n"
 > >                gdb_expect {
 > >                        -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"
 > > @@ -544,20 +539,19 @@ gdb_expect  {
 > >                        { send_gdb "n\n"
 > >                          gdb_expect {
 > >                                  -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
 > > -                                        { pass "complete 'file gdb.base/self'"}
 > > -                                -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/self'"}
 > > -                                timeout           {fail "(timeout) complete 'file gdb.base/self'"}
 > > +                                        { pass "complete 'file gdb.base/compl'"}
 > > +                                -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
 > > +                                timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
 > >                                 }
 > >                        }
 > > -                      -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/self'"}
 > > -                      timeout           {fail "(timeout) complete 'file gdb.base/self'"}
 > > +                      -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
 > > +                      timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
 > >                       }
 > >              }
 > > -        -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/self'" }
 > > -        timeout         { fail "(timeout) complete 'file gdb.base/self'" }
 > > +        -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/compl'" }
 > > +        timeout         { fail "(timeout) complete 'file gdb.base/compl'" }
 > >          }
 > > 
 > > -
 > >  send_gdb "info func mark\t"
 > >  sleep 1
 > >  gdb_expect  {
 > > @@ -569,7 +563,7 @@ gdb_expect  {
 > >                        -re "marker1.*$gdb_prompt info func marker$"\
 > >                        { send_gdb "\n"
 > >                          gdb_expect {
 > > -                                -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(.*\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long\\);\r\n$gdb_prompt $"\
 > > +                                -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);\r\n$gdb_prompt $"\
 > >                                                    { pass "complete 'info func mar'"}
 > >                                  -re ".*$gdb_prompt $" { fail "complete 'info func mar'"}
 > >                                  timeout           {fail "(timeout) complete 'info func mar'"}
 > > @@ -590,7 +584,7 @@ gdb_expect  {
 > >          -re "ask.*child.*parent.*$gdb_prompt set follow-fork-mode $"\
 > >              { send_gdb "\n"
 > >                gdb_expect {
 > > -                      -re "Requires an argument.*parent.*child.*ask.*$gdb_prompt $"\
 > > +                      -re "Requires an argument.*ask.*child.*parent.*$gdb_prompt $"\
 > >                                          { pass "complete 'set follow-fork-mode'"}
 > >                        -re "Ambiguous item \"\"\\..*$gdb_prompt $"\
 > >                                          { pass "complete 'set follow-fork-mode'"}
 > 
 > -- 
 > Fernando Nasser
 > Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
 > 2323 Yonge Street, Suite #300
 > Toronto, Ontario   M4P 2C9
 > 


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

* Re: [RFC/PATCH] gdb.base/completion.exp
  2001-05-10 14:15   ` Elena Zannoni
@ 2001-05-10 14:23     ` Fernando Nasser
  2001-05-11 12:54       ` Elena Zannoni
  0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2001-05-10 14:23 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: gdb-patches

Elena Zannoni wrote:
> 
>  > I agree with you.  It should work everywhere, this is not a system
>  > dependent feature.
>  >
>  > Fernando
>  >
> 
> Ok to check this in, then?
> 

Sure.


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

* Re: [RFC/PATCH] gdb.base/completion.exp
  2001-05-10 14:23     ` Fernando Nasser
@ 2001-05-11 12:54       ` Elena Zannoni
  0 siblings, 0 replies; 5+ messages in thread
From: Elena Zannoni @ 2001-05-11 12:54 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: Elena Zannoni, gdb-patches

Fernando Nasser writes:
 > Elena Zannoni wrote:
 > > 
 > >  > I agree with you.  It should work everywhere, this is not a system
 > >  > dependent feature.
 > >  >
 > >  > Fernando
 > >  >
 > > 
 > > Ok to check this in, then?
 > > 
 > 
 > Sure.
 > 
 > 

Committed. Let me know if something is FAILing.

Elena


 > -- 
 > Fernando Nasser
 > Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
 > 2323 Yonge Street, Suite #300
 > Toronto, Ontario   M4P 2C9
 > 


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

end of thread, other threads:[~2001-05-11 12:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-09 21:12 [RFC/PATCH] gdb.base/completion.exp Elena Zannoni
2001-05-10  6:20 ` Fernando Nasser
2001-05-10 14:15   ` Elena Zannoni
2001-05-10 14:23     ` Fernando Nasser
2001-05-11 12:54       ` Elena Zannoni

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