summary refs log tree commit diff
path: root/sysvipc/test-sysvshm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysvipc/test-sysvshm.c')
-rw-r--r--sysvipc/test-sysvshm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysvipc/test-sysvshm.c b/sysvipc/test-sysvshm.c
index f083fd280b..a1b8b4823e 100644
--- a/sysvipc/test-sysvshm.c
+++ b/sysvipc/test-sysvshm.c
@@ -25,6 +25,8 @@
 #include <sys/ipc.h>
 #include <sys/shm.h>
 
+#include <test-sysvipc.h>
+
 #include <support/support.h>
 #include <support/check.h>
 #include <support/temp_file.h>
@@ -81,6 +83,9 @@ do_test (void)
       FAIL_EXIT1 ("shmget failed (errno=%d)", errno);
     }
 
+  TEST_COMPARE (shmctl (shmid, first_shm_invalid_cmd (), NULL), -1);
+  TEST_COMPARE (errno, EINVAL);
+
   /* Get shared memory kernel information and do some sanity checks.  */
   struct shmid_ds shminfo;
   if (shmctl (shmid, IPC_STAT, &shminfo) == -1)