diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2006-06-13 08:55:22 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2006-06-13 08:55:22 +0000 |
commit | 5600ea19e0ff645c85a8719648655c2e7b2e4717 (patch) | |
tree | 606de62b7a27178ba351bec8d579244edb0c0ac1 /gdb/testsuite/gdb.base/fileio.exp | |
parent | e1c2defab5219dd0aa2a64d865e78d9ac736d0ac (diff) | |
download | fsf-binutils-gdb-5600ea19e0ff645c85a8719648655c2e7b2e4717.zip fsf-binutils-gdb-5600ea19e0ff645c85a8719648655c2e7b2e4717.tar.gz fsf-binutils-gdb-5600ea19e0ff645c85a8719648655c2e7b2e4717.tar.bz2 |
gdb/
* remote-file.io.c (remote_fileio_func_system): Treat zero length
string as NULL. Adjust for NULL pointer argument.
* doc/gdb.texinfo (system): Document behaviour with zero length
string.
gdb/testsuite/
* gdb.base/fileio.c: Add system(NULL) test.
* gdb.base/fileio.exp: Check it.
Diffstat (limited to 'gdb/testsuite/gdb.base/fileio.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/fileio.exp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp index 1da8b16..01eff55 100644 --- a/gdb/testsuite/gdb.base/fileio.exp +++ b/gdb/testsuite/gdb.base/fileio.exp @@ -180,14 +180,18 @@ gdb_test continue \ "Continuing\\..*isatty 5:.*OK$stop_msg" \ "Isatty (open file)" -send_gdb "set remote system-call-allowed 1\n"; gdb_expect -re ".*$gdb_prompt $" gdb_test continue \ "Continuing\\..*system 1:.*OK$stop_msg" \ +"System says shell is available" + +send_gdb "set remote system-call-allowed 1\n"; gdb_expect -re ".*$gdb_prompt $" +gdb_test continue \ +"Continuing\\..*system 2:.*OK$stop_msg" \ "System(3) call" # Is this ok? POSIX says system returns a waitpid status? gdb_test continue \ -"Continuing\\..*system 2:.*OK$stop_msg" \ +"Continuing\\..*system 3:.*OK$stop_msg" \ "System with invalid command returns 127" gdb_test continue \ |