exit 0
 fi 
 
+if test $BACKEND = ldif ; then
+       # The (mail=example.com*) queries hit a sizelimit, so which
+       # entry is returned depends on the ordering in the backend.
+       echo "Test does not support $BACKEND backend, test skipped"
+       exit 0
+fi
+
 mkdir -p $TESTDIR $DBDIR1 $DBDIR2
 
 # Test proxy caching:
 
        exit 0
 fi 
 
+if test $BACKEND = ldif ; then
+       # dynlist+ldif fails because back-ldif lacks bi_op_compare()
+       echo "Test does not support $BACKEND backend, test skipped"
+       exit 0
+fi
+
 mkdir -p $TESTDIR $DBDIR1
 
 $SLAPPASSWD -g -n >$CONFIGPWF