From d7754ff079210a40747b5dc0b0d793ee4a65f30f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 8 Apr 2010 17:15:49 +0000 Subject: [PATCH] * More generous buffer sizes for the semaphore and shared memory object names. * The result shared memory was mapped PROT_WRITE only, but since the variable in it is used with the increment operator, it needs PROT_READ, too. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36089 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../conformance/interfaces/shm_open/23-1.c | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/23-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/23-1.c index cd51ec39f8..e649ab994a 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/23-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/23-1.c @@ -18,13 +18,13 @@ */ /* ftruncate was formerly an XOPEN extension. We define _XOPEN_SOURCE here to - avoid warning if the implementation does not program ftruncate as a base + avoid warning if the implementation does not program ftruncate as a base interface */ /* adam.li: 2004-04-30: Rewrite the test case. The idea is that with O_CREAT and O_EXCL specified, to shm_open() a object can only success - once, although multiple processes might open with the same name at the - same time. + once, although multiple processes might open with the same name at the + same time. */ #define _XOPEN_SOURCE 600 @@ -40,7 +40,7 @@ #include #include "posixtest.h" -#define NAME_SIZE 20 +#define NAME_SIZE 50 #define SHM_NAME "/posixtest_23-1_%d" /* The processes communicate by a shared memory object */ @@ -57,10 +57,10 @@ int child_func(void) { int i, fd; struct timespec ts = {.tv_sec = 0, .tv_nsec = 0}; - int msec = 0; - + int msec = 0; + sleep(1); - srand(time(NULL)); + srand(time(NULL)); for(i=0; i 0); - + for(i=0; i