rbb 2004/05/15 12:51:50
Modified: test testshm.c
Log:
If we can't create the shared memory segment, don't try to keep going
through the test. Doing so causes a segfault to occur. Re-enable this
test.
Revision Changes Path
1.16 +4 -1 apr/test/testshm.c
Index: testshm.c
===================================================================
RCS file: /home/cvs/apr/test/testshm.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- testshm.c 14 May 2004 14:43:22 -0000 1.15
+++ testshm.c 15 May 2004 19:51:50 -0000 1.16
@@ -168,6 +168,9 @@
rv = apr_shm_create(&shm, SHARED_SIZE, SHARED_FILENAME, p);
apr_assert_success(tc, "Error allocating shared memory block", rv);
+ if (rv != APR_SUCCESS) {
+ return;
+ }
ABTS_PTR_NOTNULL(tc, shm);
retsize = apr_shm_size_get(shm);
@@ -224,7 +227,7 @@
#if APR_HAS_FORK
abts_run_test(suite, test_anon, NULL);
#endif
- /* abts_run_test(suite, test_named, NULL); */
+ abts_run_test(suite, test_named, NULL);
#endif
return suite;