From e9445a41e5cbb4f1a1091302efdf3e80d0d70c7f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 31 Oct 2026 00:30:09 +0100 Subject: Add config parsers for multiple tcp socket readers and a helper to see if we can offer it on the platform --- tests/t_event.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/t_event.c') diff --git a/tests/t_event.c b/tests/t_event.c index 706a285..1908dc9 100644 --- a/tests/t_event.c +++ b/tests/t_event.c @@ -263,9 +263,18 @@ static void case_add_nothing_then_ask(void) { pair_close(); } +/* Whether a worker thread may register a descriptor while this one waits + depends on who keeps the set. Tying the answer to the mechanism's name + here means a backend added later cannot quietly forget to say. */ +static void case_sharing_matches_the_mechanism(void) { + test_case("only a set the kernel keeps may be changed from another thread"); + CHECK_INT(event_can_share(), strcmp(event_mechanism(), "poll") ? 1 : 0); +} + void test_event(void) { CHECK_INT(event_init(), 0); CHECK(event_mechanism() != NULL); + case_sharing_matches_the_mechanism(); case_readable(); case_writable(); -- cgit v1.3