This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: cleanup some tests
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Tue, 04 Jul 2006 10:41:32 +0100
- Subject: Re: cleanup some tests
- References: <4489DEA1.2000608@codesourcery.com> <20060703154859.GA13773@nevyn.them.org>
Daniel Jacobowitz wrote:
Want to post and commit the approved bits, and then we can look at the
rest?
I've committed this patch for the approved bits. I'll investigate the other
points and repost once I have a solution.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2006-07-04 Nathan Sidwell <nathan@codesourcery.com>
* gdb.base/huge.c: Allow CRASH_GDB to be set from command
line.
* gdb.base/huge.exp: Loop over compilation to find a size that
is acceptable.
* gdb.base/remote.exp: Correct expected strings.
* gdb.dwarf2/mac-fileno.S: Avoid # comments.
Index: testsuite/gdb.base/huge.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/huge.c,v
retrieving revision 1.3
diff -c -3 -p -r1.3 huge.c
*** testsuite/gdb.base/huge.c 24 Jan 2004 18:25:06 -0000 1.3
--- testsuite/gdb.base/huge.c 4 Jul 2006 09:34:54 -0000
***************
*** 7,15 ****
/* A value that will produce a target data object large enough to
crash GDB. 0x200000 is big enough on GNU/Linux, other systems may
need a larger number. */
!
#define CRASH_GDB 0x200000
!
static int a[CRASH_GDB], b[CRASH_GDB];
main()
--- 7,15 ----
/* A value that will produce a target data object large enough to
crash GDB. 0x200000 is big enough on GNU/Linux, other systems may
need a larger number. */
! #ifndef CRASH_GDB
#define CRASH_GDB 0x200000
! #endif
static int a[CRASH_GDB], b[CRASH_GDB];
main()
Index: testsuite/gdb.base/huge.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/huge.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 huge.exp
*** testsuite/gdb.base/huge.exp 2 Feb 2004 05:15:27 -0000 1.2
--- testsuite/gdb.base/huge.exp 4 Jul 2006 09:34:54 -0000
*************** if [target_info exists gdb,skip_huge_tes
*** 36,42 ****
set testfile "huge"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
--- 36,48 ----
set testfile "huge"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
!
! for { set size [expr 2 * 1024 * 1024] } { $size > 10 } { set size [expr $size / 2] } {
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
! executable [list debug "additional_flags=-DCRASH_GDB=$size"]] \
! == "" } break
! }
! if { $size < 10 } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
Index: testsuite/gdb.base/remote.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/remote.exp,v
retrieving revision 1.5
diff -c -3 -p -r1.5 remote.exp
*** testsuite/gdb.base/remote.exp 10 Sep 2004 01:04:58 -0000 1.5
--- testsuite/gdb.base/remote.exp 4 Jul 2006 09:34:54 -0000
*************** gdb_test "set remote memory-write-packet
*** 65,78 ****
"Argument required .integer, `fixed' or `limited'.\." \
"set write-packet - NULL"
! gdb_test "set remote memory-write-packet-size 16" ""
gdb_test "show remote memory-write-packet-size" \
! "The memory-write-packet-size is 16. Packets are limited to 16 bytes." \
"set write-packet - small"
gdb_test "set remote memory-write-packet-size 1" ""
gdb_test "show remote memory-write-packet-size" \
! "The memory-write-packet-size is 1. Packets are limited to 16 bytes." \
"set write-packet - very-small"
#
--- 65,78 ----
"Argument required .integer, `fixed' or `limited'.\." \
"set write-packet - NULL"
! gdb_test "set remote memory-write-packet-size 20" ""
gdb_test "show remote memory-write-packet-size" \
! "The memory-write-packet-size is 20. Packets are limited to 20 bytes." \
"set write-packet - small"
gdb_test "set remote memory-write-packet-size 1" ""
gdb_test "show remote memory-write-packet-size" \
! "The memory-write-packet-size is 1. Packets are limited to 20 bytes." \
"set write-packet - very-small"
#
*************** if {$sizeof_random_data > 16380 } then {
*** 191,197 ****
gdb_test "set remote memory-read-packet-size 16" \
""
gdb_test "show remote memory-read-packet-size" \
! "The memory-read-packet-size is 16. Packets are limited to 16 bytes."
gdb_test "x/17ub random_data" \
"<random_data>:\[ \t\]+60\[ \t\]+74\[ \t\]+216\[ \t\]+38\[ \t\]+149\[ \t\]+49\[ \t\]+207\[ \t\]+44.*<random_data\\+8>:\[ \t\]+124\[ \t\]+38\[ \t\]+93\[ \t\]+125\[ \t\]+232\[ \t\]+67\[ \t\]+228\[ \t\]+56.*<random_data\\+16>:\[ \t\]+161"
--- 191,197 ----
gdb_test "set remote memory-read-packet-size 16" \
""
gdb_test "show remote memory-read-packet-size" \
! "The memory-read-packet-size is 16. Packets are limited to 20 bytes."
gdb_test "x/17ub random_data" \
"<random_data>:\[ \t\]+60\[ \t\]+74\[ \t\]+216\[ \t\]+38\[ \t\]+149\[ \t\]+49\[ \t\]+207\[ \t\]+44.*<random_data\\+8>:\[ \t\]+124\[ \t\]+38\[ \t\]+93\[ \t\]+125\[ \t\]+232\[ \t\]+67\[ \t\]+228\[ \t\]+56.*<random_data\\+16>:\[ \t\]+161"
Index: testsuite/gdb.dwarf2/mac-fileno.S
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/mac-fileno.S,v
retrieving revision 1.1
diff -c -3 -p -r1.1 mac-fileno.S
*** testsuite/gdb.dwarf2/mac-fileno.S 4 Nov 2005 02:48:51 -0000 1.1
--- testsuite/gdb.dwarf2/mac-fileno.S 4 Jul 2006 09:34:54 -0000
*************** func_cu1:
*** 206,215 ****
.section .debug_macinfo,"",@progbits
.Ldebug_macinfo0:
! .byte 0x3 # Start new file
! .uleb128 0x0 # Included from line number 0
! .uleb128 0x2 # Filename we just started (bug: number too large)
! .byte 0x3 # Start new file
! .uleb128 0x0 # Included from line number 0
! .uleb128 0x0 # Filename we just started (bug: number too small)
! .byte 0x0 # end of CU's macro information
--- 206,215 ----
.section .debug_macinfo,"",@progbits
.Ldebug_macinfo0:
! .byte 0x3 /* Start new file */
! .uleb128 0x0 /* Included from line number 0 */
! .uleb128 0x2 /* Filename we just started (bug: number too large) */
! .byte 0x3 /* Start new file */
! .uleb128 0x0 /* Included from line number 0 */
! .uleb128 0x0 /* Filename we just started (bug: number too small) */
! .byte 0x0 /* end of CU's macro information */