Repository navigation
Expect the socket left open on a real libevent <= 2.1.8 TLS run - #900
Merged
Merged
Conversation
test_bufferevent_creation_failure_fails_connection (#823) always expected memtier to close the socket after bufferevent_openssl_socket_new() fails. On a real libevent <= 2.1.8 with TLS, memtier leaves it open on purpose (libevent may already have closed it), as the faked-2.1.8 test next to it checks. The Rocky Linux 8 TLS job (#855) runs on 2.1.8 and has failed on master since; check the runtime version there. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fixes the
Test Rocky Linux 8 (libevent 2.1.8, TLS=1)job, which has failed on master since #855 landed (first failing run: 60ec3f0).test_bufferevent_creation_failure_fails_connection(from #823) always expected memtier to close the socket afterbufferevent_openssl_socket_new()fails. On a real libevent 2.1.8 or older with TLS, memtier deliberately leaves that socket open, because libevent may already have closed it (libevent_ssl_failure_socket_is_ours()). The neighbouringtest_tls_bufferevent_failure_leaves_socket_on_libevent_2_1_8checks exactly that with a faked version. #823 and #855 merged one after the other, so the real-2.1.8 TLS job never ran this test before landing.The test now reads the runtime libevent from
--version. With TLS on libevent older than 2.1.9 it expectsleft open on purposeand the shim'ssocket openmarker; otherwise it still expectssocket closed. This is a test-only change, and memtier's behaviour is unchanged and correct.Results for
test_library_provenance.py:🤖 Generated with Claude Code
Note
Low Risk
Test-only change; memtier runtime behavior is unchanged and only assertions are version-aware.
Overview
Fixes CI on Rocky Linux 8 (real libevent 2.1.8 with TLS) by aligning
test_bufferevent_creation_failure_fails_connectionwith memtier’s existing socket-handling rules.That test used to always require the preload shim’s
socket closedmarker after a forcedbufferevent_*_socket_new()failure. With TLS and libevent older than 2.1.9, memtier intentionally leaves the fd open and logsleft open on purpose: libevent …because libevent may have already closed it. The test now parses the runtime libevent version from--versionand branches: TLS + < 2.1.9 expects the open-socket path; all other cases still expectsocket closed. No application code changes.Reviewed by Cursor Bugbot for commit 8e30c4f. Bugbot is set up for automated code reviews on this repo. Configure here.