diff options
Diffstat (limited to 'rt/tst-shm.c')
-rw-r--r-- | rt/tst-shm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rt/tst-shm.c b/rt/tst-shm.c index 12d6da46d8..01bf89fa74 100644 --- a/rt/tst-shm.c +++ b/rt/tst-shm.c @@ -1,5 +1,5 @@ /* Test program for POSIX shm_* functions. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000. @@ -131,6 +131,7 @@ do_test (void) pid_t pid2; int status1; int status2; + struct stat st; /* Create the shared memory object. */ fd = shm_open ("/shm-test", O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600); @@ -154,6 +155,12 @@ do_test (void) return 0; } + if (fstat (fd, &st) == -1 || st.st_size != 4000) + { + shm_unlink ("/shm-test"); + error (EXIT_FAILURE, 0, "initial stat failed"); + } + /* Spawn to processes which will do the work. */ pid1 = fork (); if (pid1 == 0) |