diff options
author | David Gibson <dgibson@sneetch.ozlabs.ibm.com> | 2006-02-28 16:13:59 +1100 |
---|---|---|
committer | David Gibson <dgibson@sneetch.ozlabs.ibm.com> | 2006-02-28 16:13:59 +1100 |
commit | d130624446e278dfccf27b945f251a3d27fbaeb8 (patch) | |
tree | c85e09de7ee5dcd2765a6112b48e19d19421beb5 /tests/testutils.c | |
parent | 4b8a64e9aefbf08788f6676e7c6735026b08c892 (diff) | |
download | libhugetlbfs-d130624446e278dfccf27b945f251a3d27fbaeb8.tar.gz |
Fix cleanup of shm regions in testcases
If we received shmid 0 (possible), the SysV shm testcases would fail to clean
up the shared memory segment before exiting, usuaully causing spurious
failures of later tests. Fix.
Diffstat (limited to 'tests/testutils.c')
-rw-r--r-- | tests/testutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/testutils.c b/tests/testutils.c index 7cfd29c..2312b97 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -147,7 +147,7 @@ int test_addr_huge(void *p) int remove_shmid(int shmid) { - if (shmid > 0) { + if (shmid >= 0) { if (shmctl(shmid, IPC_RMID, NULL) != 0) { ERROR("shmctl(%x, IPC_RMID) failed (%s)\n", shmid, strerror(errno)); |