diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2023-04-27 17:49:32 +0200 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2023-04-27 17:49:32 +0200 |
commit | f2404d589ece81b029c607af011c372d52bff8d2 (patch) | |
tree | 06047d2cb96b16634f59901fc76a9907ba57eb6d /lld | |
parent | fb8557813afd41e09b4ba20091adf6b803967112 (diff) | |
download | llvm-f2404d589ece81b029c607af011c372d52bff8d2.tar.gz |
[LLD][ELF] Fix compressed-debug-level test on SystemZ
The libz compression library on SystemZ by default makes use of the
platform's hardware-accelerated compression facility. This is much
faster than the regular software implementation, but often results in
slightly different outputs. This causes failures with the
compressed-debug-level test case.
To fix this, run this test while setting the DFLTCC environment
variable to zero, which prevents use of hardware compression and falls
back to the software implementation. (This should not have any effect
on other platforms.)
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D149273
Diffstat (limited to 'lld')
-rw-r--r-- | lld/test/ELF/compressed-debug-level.test | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lld/test/ELF/compressed-debug-level.test b/lld/test/ELF/compressed-debug-level.test index ee95f1267997..71804ed66673 100644 --- a/lld/test/ELF/compressed-debug-level.test +++ b/lld/test/ELF/compressed-debug-level.test @@ -2,18 +2,22 @@ # RUN: yaml2obj %s -o %t.o -# RUN: ld.lld %t.o -o %t.default --compress-debug-sections=zlib +## The environment variable DFLTCC=0 disables use of the hardware compression +## facility on SystemZ. When this facility is enabled, slightly different +## compression results can be seen, which would throw off the tests below. + +# RUN: DFLTCC=0 ld.lld %t.o -o %t.default --compress-debug-sections=zlib # RUN: llvm-readelf --sections %t.default | FileCheck -check-prefixes=HEADER,LEVEL1 %s -# RUN: ld.lld -O0 %t.o -o %t.O0 --compress-debug-sections=zlib +# RUN: DFLTCC=0 ld.lld -O0 %t.o -o %t.O0 --compress-debug-sections=zlib # RUN: llvm-readelf --sections %t.O0 | FileCheck -check-prefixes=HEADER,LEVEL1 %s # RUN: cmp %t.default %t.O0 -# RUN: ld.lld -O1 %t.o -o %t.O1 --compress-debug-sections=zlib +# RUN: DFLTCC=0 ld.lld -O1 %t.o -o %t.O1 --compress-debug-sections=zlib # RUN: llvm-readelf --sections %t.O1 | FileCheck -check-prefixes=HEADER,LEVEL1 %s # RUN: cmp %t.default %t.O1 -# RUN: ld.lld -O2 %t.o -o %t.O2 --compress-debug-sections=zlib +# RUN: DFLTCC=0 ld.lld -O2 %t.o -o %t.O2 --compress-debug-sections=zlib # RUN: llvm-readelf --sections %t.O2 | FileCheck -check-prefixes=HEADER,LEVEL6 %s ## LLD uses zlib compression of level 1 when -O0, -O1 and level 6 when -O2. |