apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@apache.org>
Subject more problems with testdso.
Date Sun, 29 Dec 2002 22:25:43 GMT

The last few changes to testdso.c are cause me a great deal of concern.  I
am trying to get the tests to pass, but I am finding more changes that
worry me.  As the tests currently stand, we no longer check error codes on
failure.  This means that every platform can return a different error code
for the same failure.

I am wrong in assuming that in order for APR to be useful we must have
common error codes?  If we don't have common error codes, then how does an
application programmer determine what went wrong?

The patch that I am concerned about is pasted below.  I will be fixing the
underlying problem and backing out this change unless I hear a strong


   static void test_load_notthere(CuTest *tc)
       apr_dso_handle_t *h = NULL;
  +    char errstr[256];
       apr_status_t status;

       status = apr_dso_load(&h, "No_File.so", p);
  -    CuAssertIntEquals(tc, APR_EDSOOPEN, status);
  +    /* Original test was status == APR_EDSOOPEN, but that's not valid
  +     * with DSO_USE_SHL (HP/UX etc), OS2 or Win32.  Accept simple
  +     */
  +    CuAssert(tc, apr_dso_error(h, errstr, 256), status);
       CuAssertPtrNotNull(tc, h);
  -    apr_dso_unload(h);

View raw message