apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Errors in testshm.c
Date Wed, 28 May 2008 04:12:53 GMT
Just ran make check against trunk/1.3.x and got this:
------------------------------------------------------------
./testall -v testshm
testshm             : -Line 254: Error destroying shared memory block
(2): No such file or directory

FAILED 1 of 6
Failed Tests   		Total	Fail	Failed %
===================================================
testshm        		    6	   1	 16.67%
------------------------------------------------------------

That lines in testshm.c are:
------------------------------------------------------------
    rv = apr_shm_destroy(shm);
    APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv);
------------------------------------------------------------

Essentially, this calls a cleanup:
------------------------------------------------------------
APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m)
{
    return apr_pool_cleanup_run(m->pool, m, shm_cleanup_owner);
}
------------------------------------------------------------

This then wants to remove the file data/apr.testshm.shm. The problem is
that a previous call in testshm.c does that already (line 235):
------------------------------------------------------------
    rv = apr_shm_remove(SHARED_FILENAME, p);
------------------------------------------------------------

I'm not sure if this is Fedora 9 specific or something, but it looks
like something isn't quite right with this...

Maybe shm_cleanup_onwer() should check (line 73 of shmem/unix/shm.c) to
see if the the file has already been removed and return APR_SUCCESS if
it was, instead of always calling apr_file_remove()?

-- 
Bojan


Mime
View raw message