This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: testcase for "absolute source" patch
The first time I run openp.exp, I get 4 non-PASS results:
FAIL: gdb.base/openp.exp: openp s1-da (non-existent source, basename, find in <dir>/$cdir/basename)
FAIL: gdb.base/openp.exp: openp s3-da (non-existent source, relative name, find in <dir>/$cdir/relative)
FAIL: gdb.base/openp.exp: openp s4-da (non-existent source, in the current dir, find in <dir>/$cdir/basename)
FAIL: gdb.base/openp.exp: openp s5-da (non-existent source, in the upper dir, find in <dir>/$cdir/relative)
The second time I run openp.exp, it crashes and burns:
Running /berman/fsf/_current_/source/gdb/HEAD/src/gdb/testsuite/gdb.base/openp.exp ...
gdb compile failed, gcc: /tmp/migbat-testgdb-BqdGwxc7/test/gdb.base/openp/subdir/src/openp.c: No such file or directory
WARNING: Testcase compile failed.
ERROR: (timeout) GDB never initialized after 10 seconds.
UNRESOLVED: gdb.base/openp.exp: openp b1+ (existing binary, basename)
...
I suspect this line is at fault:
remote_exec host "mv $srcdir/$subdir/$testname.c $srcfile"
$srcdir is read-only.
More feedback:
. add a ChangeLog entry
. add some code at the top to check for build != host
if { [is_remote host] } {
unresolved "This test script does not work on a remote host."
return -1
}
. since the script does not work with build != host, you can simplify
all the "remote_exec host" calls to TCL primitives that run on the
build machine anyways. Like: "file mkdir ...". Your choice.
If you like "remote_exec host", you can keep it.
. error checking on every external call. Sometimes directory creation
does fail.
That's all the time I have for this round. I still haven't really
gotten into the substantive part of the script yet. :(
Michael