On 04/12/2016 08:24 PM, Luis Machado wrote:
- Addressed comments and moved the test to a proc that can be called multiple
times.
- The testcase now exercises these permutations:
* Unreadable file + empty sysroot
* Unreadable file + target: sysroot
* Removed file + empty sysroot
* Removed file + target: sysroot
With an unpatched GDB we should see this:
FAIL: gdb.server/connect-with-no-symbol-file.exp: test sysroot = "" action = permission: connection to GDBserver succeeded (the program is no longer running)
FAIL: gdb.server/connect-with-no-symbol-file.exp: test sysroot = "" action = delete: connection to GDBserver succeeded (the program is no longer running)
FAIL: gdb.server/connect-with-no-symbol-file.exp: test sysroot = "target:" action = permission: connection to GDBserver succeeded (the program is no longer running)
FAIL: gdb.server/connect-with-no-symbol-file.exp: test sysroot = "target:" action = delete: connection to GDBserver succeeded (the program is no longer running)
A patched GDB should have full passes.
Excellent. LGTM. A couple minor comments below.
+
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+ printf ("Hello world!\n");
+ return 0;
+}
No need for stdio.h / printf, right? As a general principle,
if the test doesn't need those, best just not to compile
them in either.