diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-31 00:30:09 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-31 00:30:09 +0100 |
| commit | e9445a41e5cbb4f1a1091302efdf3e80d0d70c7f (patch) | |
| tree | f2229d101a618f5d6747aa339f0d32bdc0191479 /tests | |
| parent | 15f9f81b5a8398fefca023e90d8d1c168ecef620 (diff) | |
Add config parsers for multiple tcp socket readers and a helper to see if we can offer it on the platform
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/t_event.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) { | |||
| 263 | pair_close(); | 263 | pair_close(); |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | /* Whether a worker thread may register a descriptor while this one waits | ||
| 267 | depends on who keeps the set. Tying the answer to the mechanism's name | ||
| 268 | here means a backend added later cannot quietly forget to say. */ | ||
| 269 | static void case_sharing_matches_the_mechanism(void) { | ||
| 270 | test_case("only a set the kernel keeps may be changed from another thread"); | ||
| 271 | CHECK_INT(event_can_share(), strcmp(event_mechanism(), "poll") ? 1 : 0); | ||
| 272 | } | ||
| 273 | |||
| 266 | void test_event(void) { | 274 | void test_event(void) { |
| 267 | CHECK_INT(event_init(), 0); | 275 | CHECK_INT(event_init(), 0); |
| 268 | CHECK(event_mechanism() != NULL); | 276 | CHECK(event_mechanism() != NULL); |
| 277 | case_sharing_matches_the_mechanism(); | ||
| 269 | 278 | ||
| 270 | case_readable(); | 279 | case_readable(); |
| 271 | case_writable(); | 280 | case_writable(); |
