[patch] fileio.exp FAILs if run as root

Jan Kratochvil jan.kratochvil@redhat.com
Wed Dec 12 16:26:00 GMT 2007


On Tue, 11 Dec 2007 18:54:23 +0100, Daniel Jacobowitz wrote:
...
> I think a warning is quite sufficient.  Perhaps in the FAIL message.

Attached.

Still there is an XFAIL for Cygwin so it IMO could be even for UNIX.


Regards,
Jan
-------------- next part --------------
2007-12-11  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.base/fileio.exp: Add the testcase purpose comment at the top.
	Embed a warning into the name of two testcases known to fail if we run
	as root.

--- ./gdb/testsuite/gdb.base/fileio.exp	23 Aug 2007 18:14:16 -0000	1.12
+++ ./gdb/testsuite/gdb.base/fileio.exp	11 Dec 2007 18:22:44 -0000
@@ -17,6 +17,8 @@
 # bug-gdb@prep.ai.mit.edu
 
 # This file was written by Corinna Vinschen <vinschen@redhat.com>
+# Its main purpose is to test the GDB implementation of the remote file I/O
+# protocol.
 
 if [target_info exists gdb,nofileio] {
     verbose "Skipping fileio.exp because of no fileio capabilities."
@@ -92,7 +94,7 @@ catch "system \"chmod -f -w nowrt.fileio
 
 gdb_test continue \
 "Continuing\\..*open 5:.*EACCES$stop_msg" \
-"Open for write but no write permission returns EACCES"
+"Open for write but no write permission returns EACCES (it also fails if running as root)"
 
 gdb_test continue \
 "Continuing\\..*write 1:.*OK$stop_msg" \
@@ -234,7 +236,7 @@ if [ishost *cygwin*] {
 }
 gdb_test continue \
 "Continuing\\..*unlink 2:.*EACCES$stop_msg" \
-"Unlinking a file in a directory w/o write access returns EACCES"
+"Unlinking a file in a directory w/o write access returns EACCES (it also fails if running as root)"
 
 gdb_test continue \
 "Continuing\\..*unlink 3:.*ENOENT$stop_msg" \


More information about the Gdb-patches mailing list