summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-05-24 13:45:29 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-05-24 13:45:29 +0000
commit02e0a7d58d07156509c722ad82e32fb774a70645 (patch)
tree3824bbfa00ba3eb558603120ddaa7f65cf103e3d
parentff0cf25236f12559ad3b3bd6966e80d6f31cf392 (diff)
[MC/ELF] - Fixed insufficient compression.s test
Main problem that .debug_info section was used to check that llvm-dwarfdump is able to decompress data that was compressed with llvm-mc tool. This section was not compressed actually, because consumes more space in compressed view. I changed testcase to use .debug_str section which is one that is really compressed. So currently test do what is probably was expected to do: checks that "data"->llvm-mc->llvm-dwarfdump->dumps back initial "data". Differential revision: http://reviews.llvm.org/D20466 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270560 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/MC/ELF/compression.s22
1 files changed, 13 insertions, 9 deletions
diff --git a/test/MC/ELF/compression.s b/test/MC/ELF/compression.s
index 5560ba78c68..509b5070aad 100644
--- a/test/MC/ELF/compression.s
+++ b/test/MC/ELF/compression.s
@@ -1,16 +1,11 @@
// RUN: llvm-mc -filetype=obj -compress-debug-sections -triple x86_64-pc-linux-gnu < %s -o %t
// RUN: llvm-objdump -s %t | FileCheck %s
-// RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck --check-prefix=INFO %s
+// RUN: llvm-dwarfdump -debug-dump=str %t | FileCheck --check-prefix=STR %s
// RUN: llvm-mc -filetype=obj -compress-debug-sections -triple i386-pc-linux-gnu < %s \
// RUN: | llvm-readobj -symbols - | FileCheck --check-prefix=386-SYMBOLS %s
// REQUIRES: zlib
-// CHECK: Contents of section .zdebug_line:
-// Check for the 'ZLIB' file magic at the start of the section only
-// CHECK-NEXT: ZLIB
-// CHECK-NOT: ZLIB
-
// Don't compress small sections, such as this simple debug_abbrev example
// CHECK: Contents of section .debug_abbrev:
// CHECK-NOT: ZLIB
@@ -18,13 +13,19 @@
// CHECK: Contents of section .debug_info:
+// CHECK: Contents of section .zdebug_str:
+// Check for the 'ZLIB' file magic at the start of the section only
+// CHECK-NEXT: ZLIB
+// CHECK-NOT: ZLIB
+
// FIXME: Handle compressing alignment fragments to support compressing debug_frame
// CHECK: Contents of section .debug_frame:
// CHECK-NOT: ZLIB
// CHECK: Contents of
-// Decompress one valid dwarf section just to check that this roundtrips
-// INFO: 0x00000000: Compile Unit: length = 0x0000000c version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000010)
+// Decompress one valid dwarf section just to check that this roundtrips,
+// we use .zdebug_str section for that
+// STR: perfectly compressable data sample *****************************************
// In x86 32 bit named symbols are used for temporary symbols in merge
// sections, so make sure we handle symbols inside compressed sections
@@ -74,6 +75,9 @@ foo:
.cfi_endproc
.cfi_sections .debug_frame
+# Below is the section we will use to check that after compression with llvm-mc,
+# llvm-dwarfdump tool will be able to decompress data back and dump it. Data sample
+# should be compressable enough, so it is filled with some amount of equal symbols at the end
.section .debug_str,"MS",@progbits,1
.Linfo_string0:
- .asciz "compress this "
+ .asciz "perfectly compressable data sample *****************************************"