From a256afcdc36561e0614f32eddd89c7584e0ac936 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 13 Feb 2007 11:25:51 +0000 Subject: [PATCH] Exit if no values returned in do_random --- tests/progs/slapd-search.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/progs/slapd-search.c b/tests/progs/slapd-search.c index d18ae8dc14..e0b6b1d5c5 100644 --- a/tests/progs/slapd-search.c +++ b/tests/progs/slapd-search.c @@ -295,6 +295,12 @@ do_random( char *uri, char *manager, struct berval *passwd, ldap_msgfree( res ); + if ( !values ) { + fprintf( stderr, " PID=%ld - Search base=\"%s\" filter=\"%s\" got %d values.\n", + (long) pid, sbase, filter, nvalues ); + exit(EXIT_FAIL); + } + if ( do_retry == maxretries ) { fprintf( stderr, " PID=%ld - Search base=\"%s\" filter=\"%s\" got %d values.\n", (long) pid, sbase, filter, nvalues ); -- 2.39.5