Commit c1ad1773f5 for openssl.org
commit c1ad1773f5b76dcc836a9744677449885d060c43
Author: Neil Horman <nhorman@openssl.org>
Date: Wed Apr 29 19:07:11 2026 -0400
correct property_test
The duplicate property test has to change because we now archive QUERYs
instead of removing them immediately (i.e. we don't drop the ref count
until the store is freed).
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Bob Beck <beck@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Jun 9 18:17:21 2026
(Merged from https://github.com/openssl/openssl/pull/31018)
diff --git a/test/property_test.c b/test/property_test.c
index 7d072d1b82..467647bf90 100644
--- a/test/property_test.c
+++ b/test/property_test.c
@@ -666,11 +666,13 @@ static int test_query_cache_set_duplicate(void)
/*
* Re-adding the same cache key exercises cleanup for a temporary generic
* QUERY that cannot be inserted because a providerless entry already
- * exists.
+ * exists. Note: Under the lockless store, the cleanup is an archival operation
+ * That keeps the old entry around until the libctx is freed, as so the refcount
+ * is monotonically incremented here
*/
ossl_method_store_cache_set(store, &prov, 1, "", &refs, counted_up_ref,
counted_down_ref);
- if (!TEST_int_eq(refs, 3)
+ if (!TEST_int_eq(refs, 5)
|| !TEST_true(ossl_method_store_cache_get(store, &prov, 1, "",
&result))
|| !TEST_ptr_eq(result, &refs))