diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-11-09 01:23:30 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-11-09 01:23:30 +0000 |
commit | 11cf87416416e13eff634a70b4954fe6a3912720 (patch) | |
tree | a6dc7a21bb3d45b89c3f95e4b5862ec9d2fab83b /gdb/testsuite/gdb.base/remote.exp | |
parent | 98007ce7b0dea06f0c04d833d39b5a9c9773a07a (diff) | |
download | fsf-binutils-gdb-11cf87416416e13eff634a70b4954fe6a3912720.zip fsf-binutils-gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.gz fsf-binutils-gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.bz2 |
import gdb-1999-11-08 snapshot
Diffstat (limited to 'gdb/testsuite/gdb.base/remote.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/remote.exp | 104 |
1 files changed, 82 insertions, 22 deletions
diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp index 4c8b415..70e97cf 100644 --- a/gdb/testsuite/gdb.base/remote.exp +++ b/gdb/testsuite/gdb.base/remote.exp @@ -35,16 +35,85 @@ set testfile "remote" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} +gdb_start + +set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] +if {$result != "" } then { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +} + + +# +# Part ONE: Check the down load commands +# + +gdb_test "show download-write-size" \ + "The write size used when downloading a program is 512." \ + "download limit default" + +gdb_test "set download-write-size" "Argument required.*" + +gdb_test "set download-write-size 0" "" +gdb_test "show download-write-size" \ + "The write size used when downloading a program is unlimited." \ + "set download limit - unlimited" + +gdb_test "show remote memory-write-packet-size" \ + "The memory-write-packet-size is 0. Packets are limited to \[0-9\]+ bytes." \ + "write-packet default" + +gdb_test "set remote memory-write-packet-size" \ + "Argument required .integer, `fixed' or `limited'.\." \ + "set write-packet - NULL" -proc gdb_load_timed {executable writesize} { +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" + +# +# Part TWO: Check the download behavour +# + +proc gdb_load_timed {executable downloadsize class writesize} { global test gdb_prompt - set test "timed download `[file tail $executable]' ($writesize)" + set test "timed download `[file tail $executable]' - $downloadsize, $class, $writesize" if {$writesize != ""} then { - send_gdb "set remotewritesize $writesize\n" + gdb_test "set remote memory-write-packet-size $writesize" \ + "" "$test - set packet size" + } + + if {$downloadsize != ""} then { + gdb_test "set download-write-size $downloadsize" \ + "" "$test - set download size" + } + + if {$downloadsize != ""} then { + send_gdb "set remote memory-write-packet-size $class\n" gdb_expect 5 { + -re ".*Change the packet size.*$" { + send_gdb "y\n" + gdb_expect 5 { + -re ".*$gdb_prompt $" { + pass "$test - set write size class" + } + timeout { + fail "$test - set write size class" + return + } + } + } -re ".*$gdb_prompt $" { } - timeout { fail "$test - setting remotewritesize" ; return } + timeout { + fail "$test - set write size class" + return + } } } @@ -58,26 +127,17 @@ proc gdb_load_timed {executable writesize} { -# tests +gdb_load_timed $binfile {} "" {} -gdb_start +# Typically about 400 bytes can be downloaded +gdb_load_timed $binfile 0 "limit" 399 +gdb_load_timed $binfile 0 "limit" 401 -set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] -if {$result != "" } then { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} +# fall back to the default +gdb_load_timed $binfile 0 "limit" 0 -gdb_load_timed $binfile {} -gdb_load_timed $binfile 50 -gdb_load_timed $binfile 100 -gdb_load_timed $binfile 200 -gdb_load_timed $binfile 400 - -# extra tests for capable targets -if {[target_info gdb,big_rx_buffers] != ""} then { - gdb_load_timed $binfile 800 - gdb_load_timed $binfile 8000 - gdb_load_timed $binfile 80000 -} +# Absolute max is 16384 +gdb_load_timed $binfile 0 "fixed" 0 +gdb_load_timed $binfile 0 "fixed" 16385 gdb_exit |