Discussion:
[testsuite] Fix ld action in run_dump_test
Thomas Preudhomme
2018-10-26 13:28:33 UTC
Permalink
Hi,

run_dump_test proposes an ld action but when trying to make use of it in
a gas test it gave me some Tcl error. It turns out that it references
the check_shared_lib_support procedure and ld_elf_shared_opt variable
both only available in ld-lib.exp. I've thus moved the procedure in
binutils-common.exp and defined the variable needed in the various
default.exp of testsuite that seem to be using run_dump_test.

Since check_shared_lib_support itself references the ld variable not
defined in binutils-common I've defined it from LD in run_dump_test and
fixed LD and LDFLAGS to be defined as expected by run_dump_test in the
various default.exp of testsuite using run_dump_test.

ChangeLog entries are as follows:

*** binutils/ChangeLog ***

2018-10-26 Thomas Preud'homme <***@linaro.org>

* testsuite/config/default.exp: Define LD, LDFLAGS and
ld_elf_shared_opt.
* testsuite/lib/binutils-common.exp (check_shared_lib_support): Moved
from ld-lib.exp.
(run_dump_test): Set ld to $LD.

*** gas/ChangeLog ***

2018-10-26 Thomas Preud'homme <***@linaro.org>

* testsuite/config/default.exp: Define LD, LDFLAGS and
ld_elf_shared_opt.

*** ld/ChangeLog ***

2018-10-26 Thomas Preud'homme <***@linaro.org>

* testsuite/lib/ld-lib.exp (check_shared_lib_support): Moved to
binutils-common.exp.

Testing: Successfully ran tests using the ld action in gas testsuite. No
regression in the testsuite when targeting arm-none-eabi.

Is this ok for master?

Best regards,

Thomas
Thomas Preudhomme
2018-10-26 13:31:24 UTC
Permalink
[Resending with proper subject tag]

On Fri, 26 Oct 2018 at 14:28, Thomas Preudhomme
Post by Thomas Preudhomme
Hi,
run_dump_test proposes an ld action but when trying to make use of it in
a gas test it gave me some Tcl error. It turns out that it references
the check_shared_lib_support procedure and ld_elf_shared_opt variable
both only available in ld-lib.exp. I've thus moved the procedure in
binutils-common.exp and defined the variable needed in the various
default.exp of testsuite that seem to be using run_dump_test.
Since check_shared_lib_support itself references the ld variable not
defined in binutils-common I've defined it from LD in run_dump_test and
fixed LD and LDFLAGS to be defined as expected by run_dump_test in the
various default.exp of testsuite using run_dump_test.
*** binutils/ChangeLog ***
* testsuite/config/default.exp: Define LD, LDFLAGS and
ld_elf_shared_opt.
* testsuite/lib/binutils-common.exp (check_shared_lib_support): Moved
from ld-lib.exp.
(run_dump_test): Set ld to $LD.
*** gas/ChangeLog ***
* testsuite/config/default.exp: Define LD, LDFLAGS and
ld_elf_shared_opt.
*** ld/ChangeLog ***
* testsuite/lib/ld-lib.exp (check_shared_lib_support): Moved to
binutils-common.exp.
Testing: Successfully ran tests using the ld action in gas testsuite. No
regression in the testsuite when targeting arm-none-eabi.
Is this ok for master?
Best regards,
Thomas
Alan Modra
2018-10-29 22:55:53 UTC
Permalink
Post by Thomas Preudhomme
run_dump_test proposes an ld action but when trying to make use of it in
a gas test it gave me some Tcl error.
I have to wonder why you are using ld in the gas testsuite (making a
test of the linker which should perhaps be moved to the ld testsuite)?

Anyway, patch is OK.
--
Alan Modra
Australia Development Lab, IBM
Thomas Preudhomme
2018-11-01 17:19:36 UTC
Permalink
Hi Alan,

Sorry for the late reply. See
https://sourceware.org/ml/binutils/2018-10/msg00289.html. In this case
I'm testing that both GAS and objcopy are doing the right thing and it
made sense to have only one set of test to reduce duplication. It also
need to run objcopy twice (once to remove a section, once to check its
behavior without that section) and I don't think the ld tests allow
this, but the run_dump_test allow it if linking. I don't technically
need linking, it was just a convenient way to get objcopy to run
twice. I welcome any suggestion on how to do this in a better way. In
the meantime I've committed this patch as if the feature is there it
should be working IMO.

Best regards,

Thomas
Post by Alan Modra
Post by Thomas Preudhomme
run_dump_test proposes an ld action but when trying to make use of it in
a gas test it gave me some Tcl error.
I have to wonder why you are using ld in the gas testsuite (making a
test of the linker which should perhaps be moved to the ld testsuite)?
Anyway, patch is OK.
--
Alan Modra
Australia Development Lab, IBM
Continue reading on narkive:
Loading...