[Date Prev][Date Next] [Chronological] [Thread] [Top]

Sparc Solaris 2.5 and the tests



First, I'll just point out that if I try to use Sleepycat db-2.4.14,
when I run the tests, ldif2id2entry reports "Resource temporarily unavailable"
from ldbm_cache_open while trying to open ./test-db/id2entry.dbb.

So, I retreated to db-2.3.16, and got around this problem.  Then I
had the problem in the tests directory that ldapsearch exits with
code 4, which probably related to the first line of output it gives,
which is:
	ldap_search: Size limit exceeded

and the test fails after producing 12 records.  If I run the slapd
test database manually, and run the ldapsearch commands manually,
I can eliminate the error message by either adding "-z 0", or "-z 20"
(there are 19 objects in the test database nears as I can tell).

It took running under gdb to make me realize that ldapsearch was
global slapd.conf from the installed directory during the library
initialization, where SIZELIMIT and TIMELIMIT directives do (er. did)
indeed exist, and were causing the tests to fail.  Commenting them
out did the trick.

On another point, I have a patch for systems which have one less arg
in gethostbyname_r and gethostbyaddr_r than was used in
libraries/libldap/util-int.c.  This needs to be wrapped in some
conditional compilation code before it is submitted, but it does
appear to work.

The difference between this and other machines appears to be that
the others return an int, 0 or -1, depending on success or failure,
and pass another argument in which a pointer to the hostent struct
is stored.  On Solaris 2.5, 2.5.1 (and 2.6 I think), these functions
return a pointer to the hostent struct or NULL upon failure.

Randy Kunkee
NeoSoft Inc.



cvs server: Diffing .
Index: util-int.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/util-int.c,v
retrieving revision 1.4
diff -c -r1.4 util-int.c
*** util-int.c	1999/01/02 22:40:32	1.4
--- util-int.c	1999/01/14 01:38:31
***************
*** 80,89 ****
  
  	if (safe_realloc( buf, buflen)) {
  		for(;buflen<BUFMAX;) {
! 			r = gethostbyname_r( name, resbuf, *buf,
! 				buflen, result, herrno_ptr );
  #ifdef NETDB_INTERNAL
! 			if ((r<0) &&
  				(*herrno_ptr==NETDB_INTERNAL) &&
  				(errno==ERANGE))
  			{
--- 80,89 ----
  
  	if (safe_realloc( buf, buflen)) {
  		for(;buflen<BUFMAX;) {
! 			*result = gethostbyname_r( name, resbuf, *buf,
! 				buflen, herrno_ptr );
  #ifdef NETDB_INTERNAL
! 			if ((*result == NULL) &&
  				(*herrno_ptr==NETDB_INTERNAL) &&
  				(errno==ERANGE))
  			{
***************
*** 92,98 ****
  				}
  	 		}
  #endif
! 			return r;
  		}
  	}
  
--- 92,98 ----
  				}
  	 		}
  #endif
! 			return *result ? 0 : -1;
  		}
  	}
  
***************
*** 123,133 ****
  	int buflen=BUFSTART;
  	if (safe_realloc( buf, buflen)) {
  		for(;buflen<BUFMAX;) {
! 			r = gethostbyaddr_r( addr, len, type,
  				resbuf, *buf, buflen, 
! 				result, herrno_ptr );
  #ifdef NETDB_INTERNAL
! 			if ((r<0) &&
  				(*herrno_ptr==NETDB_INTERNAL) &&
  				(errno==ERANGE))
  			{
--- 123,133 ----
  	int buflen=BUFSTART;
  	if (safe_realloc( buf, buflen)) {
  		for(;buflen<BUFMAX;) {
! 			*result = gethostbyaddr_r( addr, len, type,
  				resbuf, *buf, buflen, 
! 				herrno_ptr );
  #ifdef NETDB_INTERNAL
! 			if ((*result == NULL) &&
  				(*herrno_ptr==NETDB_INTERNAL) &&
  				(errno==ERANGE))
  			{
***************
*** 135,141 ****
  					continue;
  	 		}
  #endif
! 			return r;
  		}
  	}
  
--- 135,141 ----
  					continue;
  	 		}
  #endif
! 			return *result ? 0 : -1;
  		}
  	}