Skip to content

Expect the socket left open on a real libevent <= 2.1.8 TLS run - #900

Merged
fcostaoliveira merged 1 commit into
masterfrom
fix/provenance-test-libevent-2.1.8
Oct 27, 2026
Merged

fcostaoliveira merged 1 commit into
masterfrom
fix/provenance-test-libevent-2.1.8

Conversation

@fcostaoliveira

@fcostaoliveira fcostaoliveira commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

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 after bufferevent_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 neighbouring test_tls_bufferevent_failure_leaves_socket_on_libevent_2_1_8 checks 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 expects left open on purpose and the shim's socket open marker; otherwise it still expects socket closed. This is a test-only change, and memtier's behaviour is unchanged and correct.

Results for test_library_provenance.py:

  • Rocky Linux 8 (libevent 2.1.8) with TLS: 7/7.
  • Ubuntu 24.04 (libevent 2.1.12), ASan + UBSan, plain and TLS: 7/7 each.

🤖 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_connection with memtier’s existing socket-handling rules.

That test used to always require the preload shim’s socket closed marker after a forced bufferevent_*_socket_new() failure. With TLS and libevent older than 2.1.9, memtier intentionally leaves the fd open and logs left open on purpose: libevent … because libevent may have already closed it. The test now parses the runtime libevent version from --version and branches: TLS + < 2.1.9 expects the open-socket path; all other cases still expect socket 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.

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]>
@fcostaoliveira
fcostaoliveira merged commit a1926f5 into master Oct 27, 2026
223 of 224 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant