Skip to content
Snippets Groups Projects
Commit 6c2949ed authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

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.
parent 330ca36f
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment