aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/tests
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-30 12:37:48 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-30 12:37:48 -0700
commit5d707e3005f23fb82de8f2c0d23f7e523cf9bb12 (patch)
treec29733e766dc76889d096fdc40674515e84fd7fa /gpxe/src/tests
parentb1b5f569d5aa4b56f4751e6f345d5b07007a3936 (diff)
downloadsyslinux.git-5d707e3005f23fb82de8f2c0d23f7e523cf9bb12.tar.gz
syslinux.git-5d707e3005f23fb82de8f2c0d23f7e523cf9bb12.tar.xz
syslinux.git-5d707e3005f23fb82de8f2c0d23f7e523cf9bb12.zip
gPXE: update gPXE to get rid of gpxe/src/Config
gpxe/src/Config versus gpxe/src/config is a problem on case-deficient filesystems; update to top of tree gPXE so we don't have that problem anymore.
Diffstat (limited to 'gpxe/src/tests')
-rw-r--r--gpxe/src/tests/gdbstub_test.S25
-rw-r--r--gpxe/src/tests/gdbstub_test.gdb48
2 files changed, 67 insertions, 6 deletions
diff --git a/gpxe/src/tests/gdbstub_test.S b/gpxe/src/tests/gdbstub_test.S
index ee594ea8..bd293836 100644
--- a/gpxe/src/tests/gdbstub_test.S
+++ b/gpxe/src/tests/gdbstub_test.S
@@ -1,4 +1,9 @@
.arch i386
+
+ .section ".data"
+watch_me:
+ .long 0xfeedbeef
+
.section ".text"
.code32
gdbstub_test:
@@ -25,5 +30,25 @@ gdbstub_test:
int $3
addl $8, %esp
+ /* 5. Step test */
+ int $3
+ nop
+
+ /* 6. Access watch test */
+ movl $0x600d0000, %ecx
+ movl watch_me, %eax
+ movl $0xbad00000, %ecx
+ int $3
+ movl $0x600d0001, %ecx
+ movl %eax, watch_me
+ movl $0xbad00001, %ecx
+ int $3
+
+ /* 7. Write watch test */
+ movl $0x600d0002, %ecx
+ movl %eax, watch_me
+ movl $0xbad00002, %ecx
+ int $3
+
1:
jmp 1b
diff --git a/gpxe/src/tests/gdbstub_test.gdb b/gpxe/src/tests/gdbstub_test.gdb
index 10db863e..52aa693f 100644
--- a/gpxe/src/tests/gdbstub_test.gdb
+++ b/gpxe/src/tests/gdbstub_test.gdb
@@ -3,16 +3,16 @@
# Run:
# make bin/gpxe.hd.tmp
# make
-# tests/gdbstub_test.gdb
+# gdb
+# (gdb) target remote :TCPPORT
+# OR
+# (gdb) target remote udp:IP:UDPPORT
+# (gdb) source tests/gdbstub_test.gdb
define gpxe_load_symbols
file bin/gpxe.hd.tmp
end
-define gpxe_connect
- target remote localhost:4444
-end
-
define gpxe_assert
if $arg0 != $arg1
echo FAIL $arg2\n
@@ -71,10 +71,46 @@ define gpxe_test_mem_write
gpxe_assert ({char}($esp)) (char)0x99 "gpxe_test_mem_write char"
end
+define gpxe_test_step
+ c
+ si
+ gpxe_assert ({char}($eip-1)) (char)0x90 "gpxe_test_step" # nop = 0x90
+end
+
+define gpxe_test_awatch
+ awatch watch_me
+
+ c
+ gpxe_assert $ecx 0x600d0000 "gpxe_test_awatch read"
+ if $ecx == 0x600d0000
+ c
+ end
+
+ c
+ gpxe_assert $ecx 0x600d0001 "gpxe_test_awatch write"
+ if $ecx == 0x600d0001
+ c
+ end
+
+ delete
+end
+
+define gpxe_test_watch
+ watch watch_me
+ c
+ gpxe_assert $ecx 0x600d0002 "gpxe_test_watch"
+ if $ecx == 0x600d0002
+ c
+ end
+ delete
+end
+
gpxe_load_symbols
-gpxe_connect
gpxe_start_tests
gpxe_test_regs_read
gpxe_test_regs_write
gpxe_test_mem_read
gpxe_test_mem_write
+gpxe_test_step
+gpxe_test_awatch
+gpxe_test_watch