Repository navigation
test(cluster): unskip test_cluster_slots_malformed (stale skip after #425 fix) - #442
Merged
Merged
Conversation
PR #425 added shape validation to handle_cluster_slots so a malformed CLUSTER SLOTS reply no longer SIGSEGVs via OOB indexing. The regression test was left env.skip()'d with a stale TODO(#417) note. Verified the fixture exercises the validated path and memtier no longer crashes; removing the skip restores CI coverage for the fix. Also threads a cluster_mode parameter through _run_fixture and _assert_no_crash so the test can launch memtier with --cluster-mode (required for the bootstrap CLUSTER SLOTS call to occur) while the mock server serves the adversarial fixture bytes as the CLUSTER reply. Refs: 2.4 review #14/#22 (Review 1 + Review 8 + Review 29). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
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
test_cluster_slots_malformedintests/test_resp_response_fuzzer.pywasenv.skip()'d with aTODO(#417)note because the underlyinghandle_cluster_slotscrash hadn't been fixed yet.cluster_client::handle_cluster_slots): null top-level array, empty topology, per-shard mbulk type checks, slot-bound range/order validation, zero-length and NUL-embedded host/port guards, and every-shard-malformed fallback.--cluster-mode(so the bootstrap CLUSTER SLOTS call occurs) and the mock server is started without--passthrough-cluster(so the adversarial fixture bytes are served as the CLUSTER reply). Acluster_modeparameter is threaded through_run_fixture/_assert_no_crashto support this.Test plan
OSS_STANDALONE=1 TEST="test_resp_response_fuzzer.py:test_cluster_slots_malformed" ./tests/run_tests.sh— should report[PASS]in ~6 s.test_resp_response_fuzzer.pysuite to confirm no regressions in the other 11 fixtures.Segmentation fault/AddressSanitizerneedle in memtier stderr.🤖 Generated with Claude Code
Note
Low Risk
Test-harness changes only; no production code paths modified.
Overview
Re-enables
test_cluster_slots_malformedafter thehandle_cluster_slotshardening in PR #425. The test had beenenv.skip()with a TODO for issue #417 (SIGSEGV on malformed CLUSTER SLOTS).The harness now supports
cluster_mode:_run_fixture/_assert_no_crashcan launch memtier with--cluster-modeso bootstrap issues CLUSTER SLOTS and the mock servescluster_slots_malformed.binas that reply (without--passthrough-cluster). The cluster test calls_assert_no_crash(..., cluster_mode=True)instead of skipping.Reviewed by Cursor Bugbot for commit 97cfc80. Bugbot is set up for automated code reviews on this repo. Configure here.