From 99bcaeaf0ff692348194ed6f30162c3a0cfb9655 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 13 Sep 2018 18:55:30 +0930 Subject: [PATCH] run_dump_test replace PROG with DUMPPROG in gas and ld To be compatible with the binutils version, that uses PROG for the tool under test and DUMPPROG for the dump tool. gas/ * testsuite/gas/mips/aent-2.d, * testsuite/gas/mips/aent-mdebug-2.d, * testsuite/gas/mips/attr-gnu-4-0.d, * testsuite/gas/mips/attr-gnu-4-1.d, * testsuite/gas/mips/attr-gnu-4-2.d, * testsuite/gas/mips/attr-gnu-4-3.d, * testsuite/gas/mips/attr-gnu-4-5.d, * testsuite/gas/mips/attr-gnu-4-6.d, * testsuite/gas/mips/attr-gnu-4-7.d, * testsuite/gas/mips/attr-none-double.d, * testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d, * testsuite/gas/mips/attr-none-o32-fp64.d, * testsuite/gas/mips/attr-none-o32-fpxx.d, * testsuite/gas/mips/attr-none-single-float.d, * testsuite/gas/mips/attr-none-soft-float.d, * testsuite/gas/mips/elf-rel27.d, * testsuite/gas/mips/loc-swap-2.d, * testsuite/gas/mips/loc-swap-3.d, * testsuite/gas/mips/loc-swap.d, * testsuite/gas/mips/micromips@loc-swap-2.d, * testsuite/gas/mips/micromips@loc-swap.d, * testsuite/gas/mips/micromips@stabs-symbol-type.d, * testsuite/gas/mips/mips16-intermix.d, * testsuite/gas/mips/mips16@loc-swap-2.d, * testsuite/gas/mips/mips16@loc-swap.d, * testsuite/gas/mips/mips16@stabs-symbol-type.d, * testsuite/gas/mips/mips16e@loc-swap.d, * testsuite/gas/mips/no-odd-spreg.d, * testsuite/gas/mips/odd-spreg.d, * testsuite/gas/mips/r6-attr-none-double.d, * testsuite/gas/mips/stabs-symbol-type.d, * testsuite/lib/gas-defs.exp (run_dump_test): Replace PROG with DUMPPROG. ld/ * testsuite/lib/ld-lib.exp (run_dump_test): Replace PROG with DUMPPROG. --- gas/ChangeLog | 36 +++++++++++++++ gas/testsuite/gas/mips/aent-2.d | 2 +- gas/testsuite/gas/mips/aent-mdebug-2.d | 2 +- gas/testsuite/gas/mips/attr-gnu-4-0.d | 2 +- gas/testsuite/gas/mips/attr-gnu-4-1.d | 2 +- gas/testsuite/gas/mips/attr-gnu-4-2.d | 2 +- gas/testsuite/gas/mips/attr-gnu-4-3.d | 2 +- gas/testsuite/gas/mips/attr-gnu-4-5.d | 2 +- gas/testsuite/gas/mips/attr-gnu-4-6.d | 2 +- gas/testsuite/gas/mips/attr-gnu-4-7.d | 2 +- gas/testsuite/gas/mips/attr-none-double.d | 2 +- .../gas/mips/attr-none-o32-fp64-nooddspreg.d | 2 +- gas/testsuite/gas/mips/attr-none-o32-fp64.d | 2 +- gas/testsuite/gas/mips/attr-none-o32-fpxx.d | 2 +- .../gas/mips/attr-none-single-float.d | 2 +- gas/testsuite/gas/mips/attr-none-soft-float.d | 2 +- gas/testsuite/gas/mips/elf-rel27.d | 2 +- gas/testsuite/gas/mips/loc-swap-2.d | 2 +- gas/testsuite/gas/mips/loc-swap-3.d | 2 +- gas/testsuite/gas/mips/loc-swap.d | 2 +- gas/testsuite/gas/mips/micromips@loc-swap-2.d | 2 +- gas/testsuite/gas/mips/micromips@loc-swap.d | 2 +- .../gas/mips/micromips@stabs-symbol-type.d | 2 +- gas/testsuite/gas/mips/mips16-intermix.d | 2 +- gas/testsuite/gas/mips/mips16@loc-swap-2.d | 2 +- gas/testsuite/gas/mips/mips16@loc-swap.d | 2 +- .../gas/mips/mips16@stabs-symbol-type.d | 2 +- gas/testsuite/gas/mips/mips16e@loc-swap.d | 2 +- gas/testsuite/gas/mips/no-odd-spreg.d | 2 +- gas/testsuite/gas/mips/odd-spreg.d | 2 +- gas/testsuite/gas/mips/r6-attr-none-double.d | 2 +- gas/testsuite/gas/mips/stabs-symbol-type.d | 2 +- gas/testsuite/lib/gas-defs.exp | 46 +++++++++---------- ld/ChangeLog | 5 ++ ld/testsuite/lib/ld-lib.exp | 43 ++++++++--------- 35 files changed, 117 insertions(+), 75 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 2f1ba9e4ab..9a1a48b3c2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,39 @@ +2018-09-15 Alan Modra + + * testsuite/gas/mips/aent-2.d, + * testsuite/gas/mips/aent-mdebug-2.d, + * testsuite/gas/mips/attr-gnu-4-0.d, + * testsuite/gas/mips/attr-gnu-4-1.d, + * testsuite/gas/mips/attr-gnu-4-2.d, + * testsuite/gas/mips/attr-gnu-4-3.d, + * testsuite/gas/mips/attr-gnu-4-5.d, + * testsuite/gas/mips/attr-gnu-4-6.d, + * testsuite/gas/mips/attr-gnu-4-7.d, + * testsuite/gas/mips/attr-none-double.d, + * testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d, + * testsuite/gas/mips/attr-none-o32-fp64.d, + * testsuite/gas/mips/attr-none-o32-fpxx.d, + * testsuite/gas/mips/attr-none-single-float.d, + * testsuite/gas/mips/attr-none-soft-float.d, + * testsuite/gas/mips/elf-rel27.d, + * testsuite/gas/mips/loc-swap-2.d, + * testsuite/gas/mips/loc-swap-3.d, + * testsuite/gas/mips/loc-swap.d, + * testsuite/gas/mips/micromips@loc-swap-2.d, + * testsuite/gas/mips/micromips@loc-swap.d, + * testsuite/gas/mips/micromips@stabs-symbol-type.d, + * testsuite/gas/mips/mips16-intermix.d, + * testsuite/gas/mips/mips16@loc-swap-2.d, + * testsuite/gas/mips/mips16@loc-swap.d, + * testsuite/gas/mips/mips16@stabs-symbol-type.d, + * testsuite/gas/mips/mips16e@loc-swap.d, + * testsuite/gas/mips/no-odd-spreg.d, + * testsuite/gas/mips/odd-spreg.d, + * testsuite/gas/mips/r6-attr-none-double.d, + * testsuite/gas/mips/stabs-symbol-type.d, + * testsuite/lib/gas-defs.exp (run_dump_test): Replace PROG + with DUMPPROG. + 2018-09-15 Alan Modra * testsuite/gas/elf/symver.d, diff --git a/gas/testsuite/gas/mips/aent-2.d b/gas/testsuite/gas/mips/aent-2.d index 4115919850..0a4a313379 100644 --- a/gas/testsuite/gas/mips/aent-2.d +++ b/gas/testsuite/gas/mips/aent-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .aent directive 2 #as: -32 diff --git a/gas/testsuite/gas/mips/aent-mdebug-2.d b/gas/testsuite/gas/mips/aent-mdebug-2.d index eea4115c44..89d07c0a16 100644 --- a/gas/testsuite/gas/mips/aent-mdebug-2.d +++ b/gas/testsuite/gas/mips/aent-mdebug-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .aent directive with ECOFF debug 2 #as: -32 -mdebug diff --git a/gas/testsuite/gas/mips/attr-gnu-4-0.d b/gas/testsuite/gas/mips/attr-gnu-4-0.d index 7728079970..f3ebff3d34 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-0.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-0.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,0 diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1.d b/gas/testsuite/gas/mips/attr-gnu-4-1.d index ee1bc49dd7..e94ea10388 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-1.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-1.d @@ -1,5 +1,5 @@ #source: attr-gnu-4-1.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,1 (double precision) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-2.d b/gas/testsuite/gas/mips/attr-gnu-4-2.d index eb06a1f82b..6995ec2217 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-2.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-2.d @@ -1,6 +1,6 @@ #source: attr-gnu-4-2.s #as: -msingle-float -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,2 (single precision) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-3.d b/gas/testsuite/gas/mips/attr-gnu-4-3.d index ed0be23d08..3f18c675c6 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-3.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-3.d @@ -1,6 +1,6 @@ #as: -msoft-float #source: attr-gnu-4-3.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,3 (-msoft-float) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-5.d b/gas/testsuite/gas/mips/attr-gnu-4-5.d index 8ae92d700c..2c6877229a 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-5.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-5.d @@ -1,6 +1,6 @@ #as: -32 -mfpxx #source: attr-gnu-4-5.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,5 (-mfpxx) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6.d b/gas/testsuite/gas/mips/attr-gnu-4-6.d index cb83ac27b7..10627e8356 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-6.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-6.d @@ -1,6 +1,6 @@ #as: -32 #source: attr-gnu-4-6.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,6 (-mfp64) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7.d b/gas/testsuite/gas/mips/attr-gnu-4-7.d index c01904df16..b7bbb3400b 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-7.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-7.d @@ -1,6 +1,6 @@ #as: -32 #source: attr-gnu-4-7.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,7 (-mfp64 -mno-odd-spreg) diff --git a/gas/testsuite/gas/mips/attr-none-double.d b/gas/testsuite/gas/mips/attr-none-double.d index 639bb5348f..1977e16bc7 100644 --- a/gas/testsuite/gas/mips/attr-none-double.d +++ b/gas/testsuite/gas/mips/attr-none-double.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #readelf: -A #name: MIPS infer fpabi (double-precision) diff --git a/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d b/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d index 65e1517929..dba02c03eb 100644 --- a/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d +++ b/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d @@ -1,6 +1,6 @@ #as: -mfp64 -mno-odd-spreg -32 #source: empty.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS infer fpabi (O32 fp64 nooddspreg) diff --git a/gas/testsuite/gas/mips/attr-none-o32-fp64.d b/gas/testsuite/gas/mips/attr-none-o32-fp64.d index 90c87988db..567cf43e7a 100644 --- a/gas/testsuite/gas/mips/attr-none-o32-fp64.d +++ b/gas/testsuite/gas/mips/attr-none-o32-fp64.d @@ -1,6 +1,6 @@ #as: -mfp64 -32 #source: empty.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS infer fpabi (O32 fp64) diff --git a/gas/testsuite/gas/mips/attr-none-o32-fpxx.d b/gas/testsuite/gas/mips/attr-none-o32-fpxx.d index 86d6aa4f26..28bab75e13 100644 --- a/gas/testsuite/gas/mips/attr-none-o32-fpxx.d +++ b/gas/testsuite/gas/mips/attr-none-o32-fpxx.d @@ -1,6 +1,6 @@ #as: -mfpxx -32 #source: empty.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS infer fpabi (O32 fpxx) diff --git a/gas/testsuite/gas/mips/attr-none-single-float.d b/gas/testsuite/gas/mips/attr-none-single-float.d index 9c03a5111c..abef34ace7 100644 --- a/gas/testsuite/gas/mips/attr-none-single-float.d +++ b/gas/testsuite/gas/mips/attr-none-single-float.d @@ -1,5 +1,5 @@ #as: -msingle-float -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #readelf: -A #name: MIPS infer fpabi (single-precision) diff --git a/gas/testsuite/gas/mips/attr-none-soft-float.d b/gas/testsuite/gas/mips/attr-none-soft-float.d index 0b4cf7a11b..078fde5df9 100644 --- a/gas/testsuite/gas/mips/attr-none-soft-float.d +++ b/gas/testsuite/gas/mips/attr-none-soft-float.d @@ -1,5 +1,5 @@ #as: -msoft-float -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #readelf: -A #name: MIPS infer fpabi (soft-precision) diff --git a/gas/testsuite/gas/mips/elf-rel27.d b/gas/testsuite/gas/mips/elf-rel27.d index b3a0648769..6a2018384c 100644 --- a/gas/testsuite/gas/mips/elf-rel27.d +++ b/gas/testsuite/gas/mips/elf-rel27.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -Wr #name: MIPS ELF reloc 27 #as: -32 diff --git a/gas/testsuite/gas/mips/loc-swap-2.d b/gas/testsuite/gas/mips/loc-swap-2.d index 204b93d545..8eb2c1c76e 100644 --- a/gas/testsuite/gas/mips/loc-swap-2.d +++ b/gas/testsuite/gas/mips/loc-swap-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping (2) #as: -32 diff --git a/gas/testsuite/gas/mips/loc-swap-3.d b/gas/testsuite/gas/mips/loc-swap-3.d index 0610a443f7..595493c8ad 100644 --- a/gas/testsuite/gas/mips/loc-swap-3.d +++ b/gas/testsuite/gas/mips/loc-swap-3.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #as: -32 #name: MIPS DWARF-2 location information with branch swapping (3) diff --git a/gas/testsuite/gas/mips/loc-swap.d b/gas/testsuite/gas/mips/loc-swap.d index 48e13ef03a..ef44136c44 100644 --- a/gas/testsuite/gas/mips/loc-swap.d +++ b/gas/testsuite/gas/mips/loc-swap.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping #as: -32 diff --git a/gas/testsuite/gas/mips/micromips@loc-swap-2.d b/gas/testsuite/gas/mips/micromips@loc-swap-2.d index ad96744bef..7f19ad58b9 100644 --- a/gas/testsuite/gas/mips/micromips@loc-swap-2.d +++ b/gas/testsuite/gas/mips/micromips@loc-swap-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping (2) #as: -32 diff --git a/gas/testsuite/gas/mips/micromips@loc-swap.d b/gas/testsuite/gas/mips/micromips@loc-swap.d index a7f07e57bd..972cf5667b 100644 --- a/gas/testsuite/gas/mips/micromips@loc-swap.d +++ b/gas/testsuite/gas/mips/micromips@loc-swap.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping #as: -32 diff --git a/gas/testsuite/gas/mips/micromips@stabs-symbol-type.d b/gas/testsuite/gas/mips/micromips@stabs-symbol-type.d index c93efe5b8f..2f33129c8d 100644 --- a/gas/testsuite/gas/mips/micromips@stabs-symbol-type.d +++ b/gas/testsuite/gas/mips/micromips@stabs-symbol-type.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .stab symbol type #as: -32 diff --git a/gas/testsuite/gas/mips/mips16-intermix.d b/gas/testsuite/gas/mips/mips16-intermix.d index 0242d9c2b6..4606ce2689 100644 --- a/gas/testsuite/gas/mips/mips16-intermix.d +++ b/gas/testsuite/gas/mips/mips16-intermix.d @@ -1,4 +1,4 @@ -#PROG: nm +#DUMPPROG: nm #as: -mips32r2 -32 #name: MIPS16 intermix diff --git a/gas/testsuite/gas/mips/mips16@loc-swap-2.d b/gas/testsuite/gas/mips/mips16@loc-swap-2.d index 85beeacf28..8fd71e5ae7 100644 --- a/gas/testsuite/gas/mips/mips16@loc-swap-2.d +++ b/gas/testsuite/gas/mips/mips16@loc-swap-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping (2) #as: -32 diff --git a/gas/testsuite/gas/mips/mips16@loc-swap.d b/gas/testsuite/gas/mips/mips16@loc-swap.d index cdac1ae8e2..0327e98410 100644 --- a/gas/testsuite/gas/mips/mips16@loc-swap.d +++ b/gas/testsuite/gas/mips/mips16@loc-swap.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping #as: -32 diff --git a/gas/testsuite/gas/mips/mips16@stabs-symbol-type.d b/gas/testsuite/gas/mips/mips16@stabs-symbol-type.d index b37aa1ebc0..04a6cce749 100644 --- a/gas/testsuite/gas/mips/mips16@stabs-symbol-type.d +++ b/gas/testsuite/gas/mips/mips16@stabs-symbol-type.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .stab symbol type #as: -32 diff --git a/gas/testsuite/gas/mips/mips16e@loc-swap.d b/gas/testsuite/gas/mips/mips16e@loc-swap.d index 973745f0f6..03d08a2dd6 100644 --- a/gas/testsuite/gas/mips/mips16e@loc-swap.d +++ b/gas/testsuite/gas/mips/mips16e@loc-swap.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping #as: -32 diff --git a/gas/testsuite/gas/mips/no-odd-spreg.d b/gas/testsuite/gas/mips/no-odd-spreg.d index f33e3a6a42..244938c8ee 100644 --- a/gas/testsuite/gas/mips/no-odd-spreg.d +++ b/gas/testsuite/gas/mips/no-odd-spreg.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #as: -32 -mno-odd-spreg #readelf: -A diff --git a/gas/testsuite/gas/mips/odd-spreg.d b/gas/testsuite/gas/mips/odd-spreg.d index 7f80c2c1bb..951c011fb4 100644 --- a/gas/testsuite/gas/mips/odd-spreg.d +++ b/gas/testsuite/gas/mips/odd-spreg.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #as: -32 -modd-spreg #readelf: -A diff --git a/gas/testsuite/gas/mips/r6-attr-none-double.d b/gas/testsuite/gas/mips/r6-attr-none-double.d index 2a9fd36718..e9cca558ec 100644 --- a/gas/testsuite/gas/mips/r6-attr-none-double.d +++ b/gas/testsuite/gas/mips/r6-attr-none-double.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #readelf: -A #name: MIPS infer fpabi (double-precision) diff --git a/gas/testsuite/gas/mips/stabs-symbol-type.d b/gas/testsuite/gas/mips/stabs-symbol-type.d index 4f8501d952..450ac1f541 100644 --- a/gas/testsuite/gas/mips/stabs-symbol-type.d +++ b/gas/testsuite/gas/mips/stabs-symbol-type.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .stab symbol type #as: -32 diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp index 2d7d38eca7..fe361357c3 100644 --- a/gas/testsuite/lib/gas-defs.exp +++ b/gas/testsuite/lib/gas-defs.exp @@ -365,7 +365,7 @@ proc run_dump_tests { testcases {extra_options {}} } { # FLAGS, in addition to the .o file name. Note that they are run # with LC_ALL=C in the environment to give consistent sorting # of symbols. If no FLAGS are needed then use: -# PROG: [nm objdump readelf addr2line] +# DUMPPROG: [nm objdump readelf addr2line] # instead. # Note: for objdump, we automatically replaces the standard section # names (.text, .data and .bss) by target ones if any (eg. rx-elf @@ -413,7 +413,7 @@ proc run_dump_tests { testcases {extra_options {}} } { # # error: REGEX # An error with message matching REGEX must be emitted for the test -# to pass. The PROG, addr2line, nm, objdump, and readelf options +# to pass. The DUMPPROG, addr2line, nm, objdump, and readelf options # have no meaning and need not supplied if this is present. # # warning: REGEX @@ -423,11 +423,11 @@ proc run_dump_tests { testcases {extra_options {}} } { # warning_output: FILE # FILE contains regexp lines to be matched against the diagnostic # output of the assembler. This does not preclude the use of -# PROG, addr2line, nm, objdump, or readelf. +# DUMPPROG, addr2line, nm, objdump, or readelf. # # error_output: FILE # Means the same as 'warning_output', but also indicates that the assembler -# is expected to exit unsuccessfully (therefore PROG, addr2line, nm, +# is expected to exit unsuccessfully (therefore DUMPPROG, addr2line, nm, # objdump, and readelf have no meaning and should not be supplied). # # section-subst: no @@ -466,7 +466,7 @@ proc run_dump_test { name {extra_options {}} } { set opts(nm) {} set opts(readelf) {} set opts(name) {} - set opts(PROG) {} + set opts(DUMPPROG) {} set opts(source) {} set opts(dump) {} set opts(warning_output) {} @@ -535,18 +535,18 @@ proc run_dump_test { name {extra_options {}} } { set opts(warning_output) $opts(error_output) } - set program "" + set dumpprogram "" # It's meaningless to require an output-testing method when we # expect an error. if { $opts(error) == "" && $opts(error_output) == "" } { - if {$opts(PROG) != ""} { - switch -- $opts(PROG) { - addr2line { set program addr2line } - objdump { set program objdump } - nm { set program nm } - readelf { set program readelf } + if {$opts(DUMPPROG) != ""} { + switch -- $opts(DUMPPROG) { + addr2line { set dumpprogram addr2line } + objdump { set dumpprogram objdump } + nm { set dumpprogram nm } + readelf { set dumpprogram readelf } default { - perror "unrecognized program option $opts(PROG) in $file.d" + perror "unrecognized DUMPPROG option $opts(DUMPPROG) in $file.d" unresolved $testname return } } @@ -554,17 +554,17 @@ proc run_dump_test { name {extra_options {}} } { # Guess which program to run, by seeing which option was specified. foreach p {objdump nm readelf addr2line} { if {$opts($p) != ""} { - if {$program != ""} { + if {$dumpprogram != ""} { perror "ambiguous dump program in $file.d" unresolved $testname return } else { - set program $p + set dumpprogram $p } } } } - if { $program == "" && $opts(warning) == "" } { + if { $dumpprogram == "" && $opts(warning) == "" } { perror "dump program unspecified in $file.d" unresolved $testname return @@ -670,7 +670,7 @@ proc run_dump_test { name {extra_options {}} } { && (($cmdret == 0) == ($opts(warning) != "")) } { # We have the expected output from gas. # Return if there's nothing more to do. - if { $opts(error) != "" || $program == "" } { + if { $opts(error) != "" || $dumpprogram == "" } { pass $testname return } @@ -714,12 +714,12 @@ proc run_dump_test { name {extra_options {}} } { } } - if { $program == "" } { + if { $dumpprogram == "" } { return } - set progopts1 $opts($program) - eval set progopts \$[string toupper $program]FLAGS - eval set binary \$[string toupper $program] + set progopts1 $opts($dumpprogram) + eval set progopts \$[string toupper $dumpprogram]FLAGS + eval set binary \$[string toupper $dumpprogram] if { ![is_remote host] && [which $binary] == 0 } { untested $testname @@ -729,7 +729,7 @@ proc run_dump_test { name {extra_options {}} } { # For objdump, automatically translate standard section names to the targets one, # if they are different. set sect_names [get_standard_section_names] - if { $sect_names != "" && $program == "objdump" && $opts(section-subst) == ""} { + if { $sect_names != "" && $dumpprogram == "objdump" && $opts(section-subst) == ""} { regsub -- "-j \\.text" $progopts1 "-j [lindex $sect_names 0]" progopts1 regsub -- "-j \\.data" $progopts1 "-j [lindex $sect_names 1]" progopts1 regsub -- "-j \\.bss" $progopts1 "-j [lindex $sect_names 2]" progopts1 @@ -751,7 +751,7 @@ proc run_dump_test { name {extra_options {}} } { } # Create the substition list only for objdump reference. - if { $sect_names != "" && $program == "objdump" } { + if { $sect_names != "" && $dumpprogram == "objdump" } { # Some testcases use ".text" while others use "\.text". set regexp_subst [list "\\\\?\\.text" [lindex $sect_names 0] \ "\\\\?\\.data" [lindex $sect_names 1] \ diff --git a/ld/ChangeLog b/ld/ChangeLog index e9d4d0f08c..82127d9dd4 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2018-09-15 Alan Modra + + * testsuite/lib/ld-lib.exp (run_dump_test): Replace PROG + with DUMPPROG. + 2018-09-15 Alan Modra * testsuite/ld-elf/interleave-0.d, diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index c1ce8ee2f0..edf6e93de5 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -502,7 +502,7 @@ proc ld_link_defsyms {} { # result is analyzed by an analyzer program specified below (which # may in turn *also* be objcopy). # -# PROG: PROGRAM-NAME +# DUMPPROG: PROGRAM-NAME # The name of the program to run to analyze the .o file produced # by the assembler or the linker output. This can be omitted; # run_dump_test will guess which program to run by seeing which of @@ -567,7 +567,7 @@ proc ld_link_defsyms {} { # # error: REGEX # An error with message matching REGEX must be emitted for the test -# to pass. The PROG, readelf, objdump, and nm options have +# to pass. The DUMPPROG, readelf, objdump, and nm options have # no meaning and need not be supplied if this is present. Multiple # "error" directives append to the expected linker error message. # @@ -648,7 +648,7 @@ proc run_dump_test { name {extra_options {}} } { set opts(nm) {} set opts(readelf) {} set opts(name) {} - set opts(PROG) {} + set opts(DUMPPROG) {} set opts(source) {} set opts(dump) {} set opts(error) {} @@ -815,35 +815,36 @@ proc run_dump_test { name {extra_options {}} } { } } - set program "" + set dumpprogram "" # It's meaningless to require an output-testing method when we # expect an error. if { $opts(error) == "" && $opts(error_output) == "" } { - if {$opts(PROG) != ""} { - switch -- $opts(PROG) { - objdump { set program objdump } - nm { set program nm } - readelf { set program readelf } - default - { perror "unrecognized program option $opts(PROG) in $file.d" - unresolved $testname - return } + if { $opts(DUMPPROG) != "" } { + switch -- $opts(DUMPPROG) { + objdump { set dumpprogram objdump } + nm { set dumpprogram nm } + readelf { set dumpprogram readelf } + default { + perror "unrecognized DUMPPROG option $opts(DUMPPROG) in $file.d" + unresolved $testname + return + } } } else { # Guess which program to run, by seeing which option was specified. foreach p {objdump nm readelf} { if {$opts($p) != ""} { - if {$program != ""} { + if {$dumpprogram != ""} { perror "ambiguous dump program in $file.d" unresolved $testname return } else { - set program $p + set dumpprogram $p } } } } - if { $program == "" \ + if { $dumpprogram == "" \ && $opts(map) == "" \ && $opts(warning) == "" \ && $opts(warning_output) == "" \ @@ -1056,7 +1057,7 @@ proc run_dump_test { name {extra_options {}} } { || (($check_ld(source) == "file") \ && (![regexp_diff "tmpdir/ld.messages" "$srcdir/$subdir/$check_ld(file)"]))) } { # We have the expected output from ld. - if { $check_ld(terminal) || $program == "" } { + if { $check_ld(terminal) || $dumpprogram == "" } { pass $testname return } @@ -1076,7 +1077,7 @@ proc run_dump_test { name {extra_options {}} } { pass "$testname (map file check)" } - if { $program == "" } then { + if { $dumpprogram == "" } then { return } } @@ -1090,9 +1091,9 @@ proc run_dump_test { name {extra_options {}} } { return } - set progopts1 $opts($program) - eval set progopts \$[string toupper $program]FLAGS - eval set binary \$[string toupper $program] + set progopts1 $opts($dumpprogram) + eval set progopts \$[string toupper $dumpprogram]FLAGS + eval set binary \$[string toupper $dumpprogram] if { ![is_remote host] && [which $binary] == 0 } { untested $testname