aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-04-05 08:11:11 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-04-05 08:15:35 -0700
commit317974f6831d8c7af613257e190e0dc3125bc4cf (patch)
tree363e88c014db40a5b3f90fa48fb6807513f27ba5 /binutils/testsuite
parent20cc97536046f8aa883c3fba16aa1c9a2762f183 (diff)
downloadgdb-317974f6831d8c7af613257e190e0dc3125bc4cf.zip
gdb-317974f6831d8c7af613257e190e0dc3125bc4cf.tar.gz
gdb-317974f6831d8c7af613257e190e0dc3125bc4cf.tar.bz2
Xfail the compressed debug sections
There is no need to generate compressed debug section if compressed section size is the same as before compression. We should xfail the compressed debug section test if there are no compressed sections binutils/testsuite/ * binutils-all/compress.exp (compression_used): New. Xfail test if compression didn't make the section smaller. gas/ 2015-04-05 H.J. Lu <hongjiu.lu@intel.com> * write.c (compress_debug): Don't write the zlib header if compressed section size is the same as before compression.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/ChangeLog5
-rw-r--r--binutils/testsuite/binutils-all/compress.exp12
2 files changed, 17 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 827e836..ff77d51 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * binutils-all/compress.exp (compression_used): New.
+ Xfail test if compression didn't make the section smaller.
+
2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
* binutils-all/compress.exp (testfile): Remove suffix.
diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp
index 02111f1..f170aea 100644
--- a/binutils/testsuite/binutils-all/compress.exp
+++ b/binutils/testsuite/binutils-all/compress.exp
@@ -39,6 +39,15 @@ if { ![binutils_assemble_flags $srcdir/$subdir/dw2-1.S ${compressedfile}.o --com
return
}
+set got [remote_exec host "cmp ${testfile}.o ${compressedfile}.o" "" "/dev/null"]
+# Use it to set up xfail.
+set exec_output [lindex $got 1]
+if [string match "" $exec_output] then {
+ set compression_used ""
+} else {
+ set compression_used "yes"
+}
+
if { ![binutils_assemble_flags $srcdir/$subdir/dw2-2.S ${compressedfile2}.o --compress-debug-sections] } then {
unsupported "compressed debug sections"
return
@@ -125,6 +134,8 @@ if ![string match "" $got] then {
}
}
+# Xfail this test if there are no compressed sections.
+setup_xfail "$compression_used$target_triplet"
set testname "objcopy compress debug sections in archive"
set got [binutils_run $OBJCOPY "--compress-debug-sections ${copyfile}.a ${compressedcopyfile}.a"]
if ![string match "" $got] then {
@@ -138,6 +149,7 @@ if ![string match "" $got] then {
send_log "\n"
}
+ setup_xfail "$compression_used$target_triplet"
if { [regexp_diff tmpdir/libdw2-compressed.out $srcdir/$subdir/libdw2-compressed.out] } then {
fail "$testname"
} else {