This is an archive of the discontinued LLVM Phabricator instance.

[Tests] Require zlib for zstd tests
AbandonedPublic

Authored by mariusz-sikora-at-amd on Oct 7 2022, 3:28 AM.

Details

Summary

Tests may fail on system without zlib

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: emaste. · View Herald Transcript
mariusz-sikora-at-amd requested review of this revision.Oct 7 2022, 3:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 3:28 AM

Could you explain a bit more about how these tests fail without zlib? I don't think they should rely on it, so if there are failures it means there's either a problem with the test or the implementation.

Sorry for not providing more details.
These tests may fail if zlib is installed on the system, but front end is explicitly disabling LLVM_ENABLE_ZLIB in cmake, then LIT tests will fail with information that LLVM_ENABLE_ZLIB has been disabled.

I'm fairly confident this is the wrong fix for the problem. ZSTD compression shouldn't require ZLIB support (and similarly ZLIB compression shouldn't require ZSTD support). Without looking too hard at the problem, my guess is that there's a bug in the check for whether the --compress-debug-sections option is supported or not. There may also be a lit bug, in that the REQUIRES directive for these compression formats should be based on what happened at cmake configuration time, not (only) on what's installed on the system, but I'm not really sure.

I haven't been involved with the recent compression changes really, so I've added a few people who have.

I'm fairly confident this is the wrong fix for the problem. ZSTD compression shouldn't require ZLIB support (and similarly ZLIB compression shouldn't require ZSTD support). Without looking too hard at the problem, my guess is that there's a bug in the check for whether the --compress-debug-sections option is supported or not. There may also be a lit bug, in that the REQUIRES directive for these compression formats should be based on what happened at cmake configuration time, not (only) on what's installed on the system, but I'm not really sure.

I haven't been involved with the recent compression changes really, so I've added a few people who have.

I agree with the analysis. https://reviews.llvm.org/D135744 is the proper fix.

The test/MC/ELF test works as intended, even if I enable zstd and disable zlib.

MaskRay requested changes to this revision.Oct 11 2022, 9:43 PM
This revision now requires changes to proceed.Oct 11 2022, 9:43 PM

Closing this review. This issue will be fixed in review : https://reviews.llvm.org/D135744