ci: exercise the full public API in the release smoke test#67
Merged
Conversation
Since each smoke leg pays for a fresh runner/container spin-up, expand what one run verifies instead of adding more legs. Smoke.java now touches essentially every public entry point in the zstd module: - version/sizing info, core + bounded decompress, zero-copy decompressedSize(MemorySegment) - deterministic error paths (undersized buffer -> DST_SIZE_TOO_SMALL, corrupted checksum trailer -> CHECKSUM_WRONG) - ZstdFrame introspection (byte[] and MemorySegment overloads) and skippable frames - ZstdCompressContext/ZstdDecompressContext: parameters, all reset directives, sizeOf(), prefix (delta) compression - all 6 dictionary training variants, digested compress/decompress dictionaries (every constructor), refDictionary - zero-copy streaming (ZstdCompressStream/ZstdDecompressStream, progress()) and java.io streaming (ZstdOutputStream/ZstdInputStream, withPledgedSize) - ZstdBounds for every compress/decompress parameter, ZstdErrorCode descriptions Deliberately excludes multithreaded compression (NB_WORKERS > 0): the bundled native library is single-threaded, so exercising it would only prove the parameter is a no-op. Compiled and run locally against a fresh build (zstd-0.7.jar + zstd-native-osx-aarch64-0.7.jar) before pushing.
Owner
Author
|
Triggered the expanded smoke test on this branch against the v0.7 release: run 29167269278 — all 13 legs green, including the experimental musl/jammy/UBI/AL2023 container probes. No bugs found. |
Two follow-ups from review on #67: - Extract shared helpers for the compress/decompress round-trip patterns that were copy-pasted across zeroCopyContextCompression, streamingZeroCopy, and streamingIo (plain vs. dictionary variants), and collapse the repeated check(Arrays.equals(...), msg) pattern into a checkArrayEquals helper used throughout. - Narrow scope: this file's job is proving the released native artifact loads and links on this specific OS/arch/libc, and that off-heap MemorySegment interop and native struct layouts (streaming buffers, frame progression) work there — not re-deriving full API correctness, which the module's JUnit suite already covers more thoroughly with precise single-platform failures. Dropped the parameterBounds()/errorCodeDescriptions() enum sweeps, the 6-way dictionary-training-variant sweep, dictionaryIdApi()'s pure-Java record assertions, and the redundant dictionary-attachment/overload permutations (per-call vs. sticky vs. MemorySegment vs. digested vs. refDictionary), keeping one representative path per category. Cuts the file from ~610 to ~390 lines. Compiled and ran locally against zstd-0.7.jar + zstd-native-osx-aarch64-0.7.jar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/smoke/Smoke.javato exercise essentially every public entry point in thezstdmodule, since each smoke leg already pays for a fresh runner/container spin-up — better to get more coverage per spin-up than add more legs.decompressedSize(MemorySegment), deterministic error paths (DST_SIZE_TOO_SMALL,CHECKSUM_WRONG), frame introspection (byte[]/MemorySegmentoverloads + skippable frames),ZstdCompressContext/ZstdDecompressContextadvanced parameters/resets/prefix compression, all 6 dictionary-training variants, digested compress/decompress dictionaries, zero-copy andjava.iostreaming (includingwithPledgedSize),ZstdBoundsfor every parameter, andZstdErrorCodedescriptions.NB_WORKERS> 0) since the bundled native library is single-threaded.Test plan
zstd-0.7.jar+zstd-native-osx-aarch64-0.7.jar) — all checks pass.release-smokeworkflow on this branch and confirm all matrix legs pass.🤖 Generated with Claude Code