diff options
author | Alan Modra <amodra@gmail.com> | 2020-07-07 11:30:12 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-07-07 18:26:33 +0930 |
commit | 5a2296ac1b3c26cab589bddfded07a560e434d03 (patch) | |
tree | 1e4c22e5e8011bafa1df2e143e934559a151e4a7 /binutils | |
parent | efd0ed580ed9f84ae095b592e5ae686e62eb9a3e (diff) | |
download | fsf-binutils-gdb-5a2296ac1b3c26cab589bddfded07a560e434d03.zip fsf-binutils-gdb-5a2296ac1b3c26cab589bddfded07a560e434d03.tar.gz fsf-binutils-gdb-5a2296ac1b3c26cab589bddfded07a560e434d03.tar.bz2 |
Use is_xcoff_format in binutils testsuite
and restrict some other tests using is_*_format.
* testsuite/binutils-all/ar.exp: Use is_xcoff_format.
* testsuite/binutils-all/nm.exp: Likewise.
* testsuite/binutils-all/copy-2.d: Run only for elf and pe targets.
* testsuite/binutils-all/copy-3.d: Run only for elf targets.
* testsuite/binutils-all/set-section-alignment.d: Likewise.
* testsuite/binutils-all/copy-4.d: Don't run for xcoff.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/ar.exp | 2 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/copy-2.d | 7 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/copy-3.d | 7 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/copy-4.d | 2 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/nm.exp | 8 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/set-section-alignment.d | 3 |
7 files changed, 26 insertions, 12 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 47cad6e..55a75af 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,14 @@ 2020-07-07 Alan Modra <amodra@gmail.com> + * testsuite/binutils-all/ar.exp: Use is_xcoff_format. + * testsuite/binutils-all/nm.exp: Likewise. + * testsuite/binutils-all/copy-2.d: Run only for elf and pe targets. + * testsuite/binutils-all/copy-3.d: Run only for elf targets. + * testsuite/binutils-all/set-section-alignment.d: Likewise. + * testsuite/binutils-all/copy-4.d: Don't run for xcoff. + +2020-07-07 Alan Modra <amodra@gmail.com> + * testsuite/lib/binutils-common.exp (is_xcoff_format): New. * testsuite/binutils-all/objcopy.exp (pr25662): Exclude xcoff. diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp index 8682781..5a9d27c 100644 --- a/binutils/testsuite/binutils-all/ar.exp +++ b/binutils/testsuite/binutils-all/ar.exp @@ -727,7 +727,7 @@ if { [file exists $base_dir/bfdtest1] && [file exists $base_dir/bfdtest2] } { long_filenames $bfdtests # xcoff, ecoff, and vms archive support doesn't handle thin archives - if { ![istarget "*-*-aix*"] + if { ![is_xcoff_format] && ![istarget "*-*-*ecoff"] && ![istarget "*-*-vms"] } { thin_archive $bfdtests diff --git a/binutils/testsuite/binutils-all/copy-2.d b/binutils/testsuite/binutils-all/copy-2.d index 9eda63b..8d066c5 100644 --- a/binutils/testsuite/binutils-all/copy-2.d +++ b/binutils/testsuite/binutils-all/copy-2.d @@ -3,10 +3,9 @@ #objcopy: --set-section-flags foo=contents,alloc,load,code #name: copy with setting section flags 2 #source: copytest.s -#notarget: *-*-*aout *-*-aix* h8300-*-* hppa*-*-hpux* mips-*-ultrix* mips-*-osf* mips-*-ecoff* mips-*-irix mips-*-irix[2-4] mips-*-riscos* ns32k-*-* -# Note - we use copytest.s and a section named "foo" rather -# than .text because for some file formats (eg PE) the .text -# section has a fixed set of flags and these cannot be changed. +# Many formats do not allow arbitrary section flags, just run for ELF and PE. +#target: [is_elf_format] [is_pecoff_format] +#xfail: h8300-*-* .*: +file format .* diff --git a/binutils/testsuite/binutils-all/copy-3.d b/binutils/testsuite/binutils-all/copy-3.d index dd28719..63e84c7 100644 --- a/binutils/testsuite/binutils-all/copy-3.d +++ b/binutils/testsuite/binutils-all/copy-3.d @@ -3,9 +3,10 @@ #objcopy: --set-section-flags .text=alloc,data #name: copy with setting section flags 3 #source: bintest.s -#notarget: *-*-*aout *-*-*coff *-*-cygwin* *-*-darwin *-*-mingw* *-*-go32 *-*-*pe hppa*-*-hpux* ns32k-*-* powerpc-*-aix* rs6000-*-* rx-*-* -# The .text # section in PE/COFF has a fixed set of flags and these -# cannot be changed. We skip it for them. +# The .text section in most formats has a fixed set of flags which +# cannot be changed, just run for ELF. +#target: [is_elf_format] +#xfail: rx-*-* .*: +file format .* diff --git a/binutils/testsuite/binutils-all/copy-4.d b/binutils/testsuite/binutils-all/copy-4.d index 554c894..fa09182 100644 --- a/binutils/testsuite/binutils-all/copy-4.d +++ b/binutils/testsuite/binutils-all/copy-4.d @@ -2,7 +2,7 @@ #source: bintest.s #strip: --strip-unneeded #nm: -n -#notarget: *-*-aix* *-*-linuxecoff +#notarget: [is_xcoff_format] *-*-linuxecoff #name: strip --strip-unneeded on common symbol #... diff --git a/binutils/testsuite/binutils-all/nm.exp b/binutils/testsuite/binutils-all/nm.exp index 8964014..96cb50a 100644 --- a/binutils/testsuite/binutils-all/nm.exp +++ b/binutils/testsuite/binutils-all/nm.exp @@ -50,7 +50,9 @@ if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then { # This test does not work correctly on XCOFF targets, because XCOFF # does not enter static symbols in the symbol table. - setup_xfail "*-*-aix*" + if [is_xcoff_format] { + setup_xfail *-*-* + } set got [binutils_run $NM "$NMFLAGS $tempfile"] @@ -108,7 +110,9 @@ if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then { # This test does not work correctly on XCOFF targets, because XCOFF # does not enter static symbols in the symbol table. - setup_xfail "*-*-aix*" + if [is_xcoff_format] { + setup_xfail *-*-* + } set got [binutils_run $NM "$NMFLAGS -P $tempfile"] diff --git a/binutils/testsuite/binutils-all/set-section-alignment.d b/binutils/testsuite/binutils-all/set-section-alignment.d index d562ce1..a193bb7 100644 --- a/binutils/testsuite/binutils-all/set-section-alignment.d +++ b/binutils/testsuite/binutils-all/set-section-alignment.d @@ -2,7 +2,8 @@ #PROG: objcopy #objcopy: --set-section-alignment .text=16 #objdump: --section-headers -#notarget: *-*-*aout *-*-*coff *-*-cygwin* *-*-darwin *-*-mingw* *-*-go32 *-*-*pe hppa*-*-hpux* ns32k-*-* powerpc-*-aix* rs6000-*-* rx-*-* *-*-vms +#target: [is_elf_format] +#xfail: rx-*-* #... .*\.text.*2\*\*4 |