From 8ff1b1f0bbb788034671f2e269826f5552035424 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 14 Mar 2024 13:43:25 -0400 Subject: Fix ring unit test when mlock() is unavailable --- NEWS | 3 ++- test/test_ring.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index fab3fd4..add72dd 100644 --- a/NEWS +++ b/NEWS @@ -3,8 +3,9 @@ zix (0.4.3) unstable; urgency=medium * Avoid fdatasync() on Darwin * Fix library current_version on MacOS * Fix nullability annotations for zix_canonical_path() and friends + * Fix ring unit test when mlock() is unavailable - -- David Robillard Thu, 14 Mar 2024 16:59:01 +0000 + -- David Robillard Thu, 14 Mar 2024 17:42:49 +0000 zix (0.4.2) stable; urgency=medium diff --git a/test/test_ring.c b/test/test_ring.c index 46abe05..b1845ce 100644 --- a/test/test_ring.c +++ b/test/test_ring.c @@ -101,7 +101,7 @@ test_ring(const unsigned size) assert(zix_ring_write_space(ring) == zix_ring_capacity(ring)); const ZixStatus st = zix_ring_mlock(ring); - assert(!st || st == ZIX_STATUS_NOT_SUPPORTED); + assert(!st || st == ZIX_STATUS_NOT_SUPPORTED || st == ZIX_STATUS_UNAVAILABLE); static const size_t stack_size = (size_t)MSG_SIZE * 4U; -- cgit v1.2.1