apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Havard <brian.hav...@gmail.com>
Subject Test suit oddities
Date Sun, 04 Apr 2010 21:25:37 GMT
I've been working my way through the test suit on OS/2 and have hit a
couple of oddities where I think the test needs to be changed.

- testdso: test_unload_library() closes the library with
apr_dso_unload() and then expects apr_dso_sym() to return
APR_ESYMNOTFOUND. WTF? That's like expecting read() to return EOF on a
closed handle. Surely something like EBADF would be more appropriate. I
had a look at the unix implementation and I can see why it passes, it
returns APR_ESYMNOTFOUND for every single failure! I'd suggest just
testing for != APR_SUCCESS.

- testcond: nested_wait() creates a thread that exits while owning a
mutex and then tries to lock that mutex, expecting the result to be
EBUSY. On OS/2, when a thread exits while owning a mutex, that mutex has
an indeterminate state and any attempt to lock it returns
ERROR_SEM_OWNER_DIED. I don't see any problem with this behaviour so
would anyone object to me changing the test so that the owning thread
stays alive long enough for the primary thread to do its

View raw message