public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Help, minor bug in testsuite
@ 2010-06-04 22:27 Michael Snyder
  2010-06-04 23:40 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2010-06-04 22:27 UTC (permalink / raw)
  To: gdb

OK, not sure what to do with this one.  The test in gdb.base/list.exp
says:

     # Try listsize of 0 which suppresses printing.

     set_listsize 0
     gdb_test "list 1" "" "listsize of 0 suppresses output"


However, the test only passes because "" is the same as ".*".
In fact, the output is NOT suppressed, and I can find nowhere
in the documentation that says it SHOULD be suppressed.

I'm not sure what to do with this test...

Michael

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

* Re: Help, minor bug in testsuite
  2010-06-04 22:27 Help, minor bug in testsuite Michael Snyder
@ 2010-06-04 23:40 ` Pedro Alves
  2010-06-05  0:44   ` Michael Snyder
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2010-06-04 23:40 UTC (permalink / raw)
  To: gdb; +Cc: Michael Snyder

On Friday 04 June 2010 23:26:55, Michael Snyder wrote:
> OK, not sure what to do with this one.  The test in gdb.base/list.exp
> says:
> 
>      # Try listsize of 0 which suppresses printing.
> 
>      set_listsize 0
>      gdb_test "list 1" "" "listsize of 0 suppresses output"
> 
> 
> However, the test only passes because "" is the same as ".*".
> In fact, the output is NOT suppressed, and I can find nowhere
> in the documentation that says it SHOULD be suppressed.

(Without commenting on whether setting listsize to 0 to suppress
output had any value,) it appears to be a regression at some
point.  Note with GDB 6.0:

 >~/gdb/ancient/build-6.0/gdb/gdb ~/gdb/tests/main32
 GNU gdb 6.0
 Copyright 2003 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "i686-pc-linux-gnu"...
 (gdb) list 1
 1       #include <stdio.h>
 2
 3       int main (int argc, char **argv)
 4       {
 5         return 0;
 6       }
 (gdb) set listsize 0
 (gdb) list 1
 (gdb) 

vs current gdb:

 >./gdb ~/gdb/tests/main32
 GNU gdb (GDB) 7.1.50.20100601-cvs
 Copyright (C) 2010 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 and "show warranty" for details.
 This GDB was configured as "x86_64-unknown-linux-gnu".
 For bug reporting instructions, please see:
 <http://www.gnu.org/software/gdb/bugs/>...
 Reading symbols from /home/pedro/gdb/tests/main32...done.
 (gdb) set listsize 0
 (gdb) list 1
 1       #include <stdio.h>
 2
 3       int main (int argc, char **argv)
 4       {
 5         return 0;
 6       }
 (gdb) 


> I'm not sure what to do with this test...

-- 
Pedro Alves

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

* Re: Help, minor bug in testsuite
  2010-06-04 23:40 ` Pedro Alves
@ 2010-06-05  0:44   ` Michael Snyder
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2010-06-05  0:44 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb

Pedro Alves wrote:
> On Friday 04 June 2010 23:26:55, Michael Snyder wrote:
>> OK, not sure what to do with this one.  The test in gdb.base/list.exp
>> says:
>>
>>      # Try listsize of 0 which suppresses printing.
>>
>>      set_listsize 0
>>      gdb_test "list 1" "" "listsize of 0 suppresses output"
>>
>>
>> However, the test only passes because "" is the same as ".*".
>> In fact, the output is NOT suppressed, and I can find nowhere
>> in the documentation that says it SHOULD be suppressed.
> 
> (Without commenting on whether setting listsize to 0 to suppress
> output had any value,) it appears to be a regression at some
> point.  Note with GDB 6.0:
> 
>  >~/gdb/ancient/build-6.0/gdb/gdb ~/gdb/tests/main32
>  GNU gdb 6.0
>  Copyright 2003 Free Software Foundation, Inc.
>  GDB is free software, covered by the GNU General Public License, and you are
>  welcome to change it and/or distribute copies of it under certain conditions.
>  Type "show copying" to see the conditions.
>  There is absolutely no warranty for GDB.  Type "show warranty" for details.
>  This GDB was configured as "i686-pc-linux-gnu"...
>  (gdb) list 1
>  1       #include <stdio.h>
>  2
>  3       int main (int argc, char **argv)
>  4       {
>  5         return 0;
>  6       }
>  (gdb) set listsize 0
>  (gdb) list 1
>  (gdb) 
> 
> vs current gdb:
> 
>  >./gdb ~/gdb/tests/main32
>  GNU gdb (GDB) 7.1.50.20100601-cvs
>  Copyright (C) 2010 Free Software Foundation, Inc.
>  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>  This is free software: you are free to change and redistribute it.
>  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>  and "show warranty" for details.
>  This GDB was configured as "x86_64-unknown-linux-gnu".
>  For bug reporting instructions, please see:
>  <http://www.gnu.org/software/gdb/bugs/>...
>  Reading symbols from /home/pedro/gdb/tests/main32...done.
>  (gdb) set listsize 0
>  (gdb) list 1
>  1       #include <stdio.h>
>  2
>  3       int main (int argc, char **argv)
>  4       {
>  5         return 0;
>  6       }
>  (gdb) 
> 
> 
>> I'm not sure what to do with this test...
> 

Ah, so it looks like a false pass, and I should make it fail.

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

end of thread, other threads:[~2010-06-05  0:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-04 22:27 Help, minor bug in testsuite Michael Snyder
2010-06-04 23:40 ` Pedro Alves
2010-06-05  0:44   ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).