From dae148f3b925ba75459caec099932e31a1ad961b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 6 Apr 2015 12:19:13 -0700 Subject: [PATCH] Remove is_zlib_supported Since zlib is always supported, there is no need for is_zlib_supported. binutils/testsuite/ * binutils-all/compress.exp: Remove is_zlib_supported check. * binutils-all/objdump.exp: Likewise. * binutils-all/readelf.exp (readelf_compressed_wa_test): Likewise. * lib/utils-lib.exp (run_dump_test): Likewise. * lib/binutils-common.exp (is_zlib_supported): Removed. gas/testsuite/ * lib/gas-defs.exp (run_dump_test): Remove is_zlib_supported check. ld/testsuite/ * ld-elf/compress.exp: Remove is_zlib_supported check. Fail if --compress-debug-sections doesn't work. * lib/ld-lib.exp (run_dump_test): Remove is_zlib_supported check. --- binutils/testsuite/ChangeLog | 8 ++++++++ binutils/testsuite/binutils-all/compress.exp | 2 +- binutils/testsuite/binutils-all/objdump.exp | 2 +- binutils/testsuite/binutils-all/readelf.exp | 5 ----- binutils/testsuite/lib/binutils-common.exp | 5 ----- binutils/testsuite/lib/utils-lib.exp | 6 ------ gas/testsuite/ChangeLog | 4 ++++ gas/testsuite/lib/gas-defs.exp | 7 ------- ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-elf/compress.exp | 6 +----- ld/testsuite/lib/ld-lib.exp | 6 ------ 11 files changed, 21 insertions(+), 36 deletions(-) diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 65a22d8..ece81a6 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,5 +1,13 @@ 2015-04-06 H.J. Lu + * binutils-all/compress.exp: Remove is_zlib_supported check. + * binutils-all/objdump.exp: Likewise. + * binutils-all/readelf.exp (readelf_compressed_wa_test): Likewise. + * lib/utils-lib.exp (run_dump_test): Likewise. + * lib/binutils-common.exp (is_zlib_supported): Removed. + +2015-04-06 H.J. Lu + * binutils-all/compress.exp (compression_used): Remove "/dev/null" from remote_exec. diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp index b4a9468..36b2a26 100644 --- a/binutils/testsuite/binutils-all/compress.exp +++ b/binutils/testsuite/binutils-all/compress.exp @@ -16,7 +16,7 @@ # Test compressed .debug section. -if { [is_remote host] || ![is_elf_format] || ![is_zlib_supported] } then { +if { [is_remote host] || ![is_elf_format] } then { return } diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp index 6b7d332..6d5e76f 100644 --- a/binutils/testsuite/binutils-all/objdump.exp +++ b/binutils/testsuite/binutils-all/objdump.exp @@ -158,7 +158,7 @@ if [regexp $want $got] then { # Test objdump -s on a file that contains a compressed .debug section -if { ![is_elf_format] || ![is_zlib_supported] } then { +if { ![is_elf_format] } then { unsupported "objdump compressed debug" } elseif { ![binutils_assemble $srcdir/$subdir/dw2-compressed.S tmpdir/dw2-compressed.o] } then { fail "objdump compressed debug" diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp index 1d0ea3b..3c6472b 100644 --- a/binutils/testsuite/binutils-all/readelf.exp +++ b/binutils/testsuite/binutils-all/readelf.exp @@ -224,11 +224,6 @@ proc readelf_compressed_wa_test {} { global srcdir global subdir - if { ![is_zlib_supported] } { - unsupported "readelf -wa (compressed)" - return - } - # Compile the compressed-debug-section test file. if { [target_compile $srcdir/$subdir/dw2-compressed.S tmpdir/dw2-compressed.o object debug] != "" } { verbose "Unable to compile test file." diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index e989da4..5dadc42 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -152,11 +152,6 @@ proc is_elf64 { binary_file } { return 0 } -# True if the build supports zlib compression. -proc is_zlib_supported {} { - return 1 -} - # Compare two files line-by-line. FILE_1 is the actual output and FILE_2 # is the expected output. Ignore blank lines in either file. # diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp index 8dac718..b366b63 100644 --- a/binutils/testsuite/lib/utils-lib.exp +++ b/binutils/testsuite/lib/utils-lib.exp @@ -438,12 +438,6 @@ proc run_dump_test { name {extra_options {}} } { } } - if { [string match "*--compress-debug-sections*" $opts(as)] \ - && ![is_zlib_supported] } { - unsupported $testname - return - } - if { $opts(source) == "" } { set srcfile ${file}.s } else { diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index e26755e..c896ec5 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-04-06 H.J. Lu + + * lib/gas-defs.exp (run_dump_test): Remove is_zlib_supported check. + 2015-03-20 H.J. Lu * gas/i386/i386.exp: Don't run nops-1-bdver1, nops-1-bdver2, diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp index 602ad57..7dc4807 100644 --- a/gas/testsuite/lib/gas-defs.exp +++ b/gas/testsuite/lib/gas-defs.exp @@ -615,13 +615,6 @@ proc run_dump_test { name {extra_options {}} } { } } - if { [string match "*--compress-debug-sections*" $opts(as)] \ - && ![is_zlib_supported] } { - unsupported $testname - return - } - - if { $opts(source) == "" } { set sourcefile ${file}.s } else { diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 2b8d345..5036af1 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-04-06 H.J. Lu + + * ld-elf/compress.exp: Remove is_zlib_supported check. + Fail if --compress-debug-sections doesn't work. + * lib/ld-lib.exp (run_dump_test): Remove is_zlib_supported check. + 2015-04-01 Tejas Belagod * ld-aarch64/aarch64-elf.exp: Add erratum843419 test. diff --git a/ld/testsuite/ld-elf/compress.exp b/ld/testsuite/ld-elf/compress.exp index 850e3e8..682811a 100644 --- a/ld/testsuite/ld-elf/compress.exp +++ b/ld/testsuite/ld-elf/compress.exp @@ -25,10 +25,6 @@ if ![is_elf_format] { return } -if ![is_zlib_supported] { - return -} - # The following tests require running the executable generated by ld. if ![isnative] { return @@ -41,7 +37,7 @@ if { [which $CC] == 0 } { global as if { ![ld_assemble $as "--compress-debug-sections $srcdir/$subdir/empty.s" tmpdir/empty.o ] } { - unsupported "linker compressed debug sections" + fail "linker compressed debug sections" } set build_tests { diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 6671719..9e22706 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -779,12 +779,6 @@ proc run_dump_test { name {extra_options {}} } { set dfile $srcdir/$subdir/$opts(dump) } - if { [string match "*--compress-debug-sections*" $opts(as)] \ - && ![is_zlib_supported] } { - unsupported $testname - return - } - # Time to setup xfailures. foreach targ $opts(xfail) { setup_xfail $targ -- 2.7.4