From 6c2949ed866c2c3df19ea7e5279dce2f367be15e Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 10 Dec 1998 19:20:15 +0000 Subject: [PATCH] Change cache.c assert logic based on Hallvard's suggestion. "Check that the entry has no writers before removing it from the cache" sounds more sensible to me than "check that it *has* writers" before removing it. I've also changed the default cachesize for tests to 4. This should help discover such problems. --- servers/slapd/back-ldbm/cache.c | 2 +- tests/data/slapd-master.conf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index 1674432d69..1ab9896cca 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -200,7 +200,7 @@ cache_add_entry_lock( /* XXX check for writer lock - should also check no readers pending */ #ifdef LDAP_DEBUG - assert(pthread_rdwr_wchk_np(&e->e_rdwr)); + assert(!pthread_rdwr_rwchk_np(&e->e_rdwr)); #endif /* delete from cache and lru q */ diff --git a/tests/data/slapd-master.conf b/tests/data/slapd-master.conf index 2b936ab605..59657b7444 100644 --- a/tests/data/slapd-master.conf +++ b/tests/data/slapd-master.conf @@ -10,6 +10,7 @@ schemacheck off ####################################################################### database ldbm +cachesize 4 suffix "o=University of Michigan, c=US" directory ./test-db rootdn "cn=Manager, o=University of Michigan, c=US" -- 2.39.5