[committed] testsuite: solib-disc: Use `standard_output_file'
Commit Message
Correct a commit 2151ccc56c74 ("Always organize test artifacts in a
directory hierarchy") regression causing:
Running .../gdb/testsuite/gdb.base/solib-disc.exp ...
gdb compile failed, Assembler messages:
Fatal error: can't create .../gdb/testsuite/gdb.base/so-disc-shr.c.o: No such file or directory
by using `standard_output_file' to construct output file names
throughout.
gdb/testsuite/
* gdb.base/solib-disc.exp: Use `standard_output_file'
throughout.
---
Tested with `mips-mti-linux-gnu':
Running .../gdb/testsuite/gdb.base/solib-disc.exp ...
PASS: gdb.base/solib-disc.exp: set stop-on-solib-events 1
PASS: gdb.base/solib-disc.exp: continue to load
PASS: gdb.base/solib-disc.exp: save $pc after load
PASS: gdb.base/solib-disc.exp: disconnect after load
PASS: gdb.base/solib-disc.exp: reconnect after load
PASS: gdb.base/solib-disc.exp: check $pc after load
PASS: gdb.base/solib-disc.exp: continue to unload
PASS: gdb.base/solib-disc.exp: save $pc after unload
PASS: gdb.base/solib-disc.exp: disconnect after unload
PASS: gdb.base/solib-disc.exp: reconnect after unload
PASS: gdb.base/solib-disc.exp: check $pc after unload
and committed as obvious.
Maciej
gdb-test-solib-disc-objfile.diff
Comments
On 2016-10-06 10:17, Maciej W. Rozycki wrote:
> Correct a commit 2151ccc56c74 ("Always organize test artifacts in a
> directory hierarchy") regression causing:
>
> Running .../gdb/testsuite/gdb.base/solib-disc.exp ...
> gdb compile failed, Assembler messages:
> Fatal error: can't create .../gdb/testsuite/gdb.base/so-disc-shr.c.o:
> No such file or directory
>
> by using `standard_output_file' to construct output file names
> throughout.
>
> gdb/testsuite/
> * gdb.base/solib-disc.exp: Use `standard_output_file'
> throughout.
> ---
> Tested with `mips-mti-linux-gnu':
>
> Running .../gdb/testsuite/gdb.base/solib-disc.exp ...
> PASS: gdb.base/solib-disc.exp: set stop-on-solib-events 1
> PASS: gdb.base/solib-disc.exp: continue to load
> PASS: gdb.base/solib-disc.exp: save $pc after load
> PASS: gdb.base/solib-disc.exp: disconnect after load
> PASS: gdb.base/solib-disc.exp: reconnect after load
> PASS: gdb.base/solib-disc.exp: check $pc after load
> PASS: gdb.base/solib-disc.exp: continue to unload
> PASS: gdb.base/solib-disc.exp: save $pc after unload
> PASS: gdb.base/solib-disc.exp: disconnect after unload
> PASS: gdb.base/solib-disc.exp: reconnect after unload
> PASS: gdb.base/solib-disc.exp: check $pc after unload
>
> and committed as obvious.
>
> Maciej
Good catch! I probably hadn't tested the patch with gdbserver...
Did you consider using standard_testfile to define the usual testfile,
srcfile and binfile?
On Thu, 6 Oct 2016, Simon Marchi wrote:
> Did you consider using standard_testfile to define the usual testfile, srcfile
> and binfile?
Nope, I've got too many commitments right now to make non-essential
clean-ups. Please feel free to try yourself.
Maciej
===================================================================
@@ -27,11 +27,11 @@ if { [info proc gdb_reconnect] == "" } {
set testfile solib-disc
set libfile so-disc-shr
set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
set libsrc "${srcdir}/${subdir}/${libfile}.c"
set libname "${libfile}.so"
-set libobj "${objdir}/${subdir}/${libname}"
+set libobj [standard_output_file ${libname}]
set execsrc "${srcdir}/${subdir}/${srcfile}"
set lib_dlopen [shlib_target_file ${libname}]
set lib_syms [shlib_symbol_file ${libname}]