Commit Graph

10 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
1bc727fc2f tests: add more IPC decoding checks
* tests/ipc_msg.c: Additional msgget (parameter format) and msgctl
(parameter format, decoding of struct msqid_ds in IPC_SET/IPC_STAT
commands) checks.
* tests/ipc_sem.c: Additional semget and semctl checks.
* tests/ipc_shm.c: Additional shmget and shmctl checks.
* tests/semop.c: Additional semop checks.  Add checks for semtimedop.
* tests/semop.test: Add explicit -e parameter in order to trace both
semop and semtimedop.
* tests/shmxt.c: Additional shmat and shmdt checks.
2016-09-13 17:21:20 +00:00
378a47e80a tests: use sprintrc_grep in tests/ipc_shm.c
* tests/ipc_shm.c (main): Use sprintrc_grep.
2016-09-12 10:30:22 +00:00
7b93574bc7 ipc: fix printing key_t arguments of msgget, semget, and shmget syscalls
* ipc_msg.c (SYS_FUNC(msgget)): As key_t type in the kernel
is __kernel_key_t (i.e. int), cast key_t argument to int
and print it using %#x format.
* ipc_sem.c (SYS_FUNC(semget)): Likewise.
* ipc_shm.c (SYS_FUNC(shmget)): Likewise.
* tests/ipc_msg.c (main): Test it.
* tests/ipc_sem.c (main): Likewise.
* tests/ipc_shm.c (main): Likewise.
2016-09-08 16:26:48 +00:00
29e5bde776 tests/ipc_shm.c: use libtests
* tests/ipc_shm.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
2016-01-06 11:59:58 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
Elvira Khabirova
0a6af9b0a4 Enhance shmctl syscall decoding
Make parser of shmctl syscall print struct shmid_ds.

* ipc_shmctl.c (shmid_ds_t): New typedef.  Mpersify it.
(print_shmid_ds): New function.  Use shmid_ds_t.
(sys_shmctl): Use print_shmid_ds.
* tests/ipc_shm.c: Update for struct shmid_ds support.
2015-08-28 08:46:23 +00:00
2370d53281 ipc.c: use printaddr and umove_or_printaddr
* ipc.c (sys_msgctl): Use printaddr.
(tprint_msgbuf): New function.
(tprint_msgsnd, tprint_msgrcv): Use it.
(sys_msgrcv): Use umove_or_printaddr.
(tprint_sembuf): Rename to tprint_sembuf_array.
(tprint_sembuf): New function.
(tprint_sembuf_array): Use it.
(sys_semop, sys_semtimedop): Update callers.
(sys_shmctl, sys_shmat, sys_shmdt): Use printaddr.
(sys_mq_open, printmqattr): Use printaddr and umove_or_printaddr.
* tests/ipc_msg.c (main): Update msgctl IPC_RMID regexp.
* tests/ipc_shm.c (main): Update shmctl IPC_RMID regexp.
2015-07-20 22:03:06 +00:00
Andreas Schwab
3aa45f3cc2 tests/ipc_*: match IPC_64 flag
* tests/ipc_msg.c (main): Optionally match "IPC_64|" in the third
argument of the ipc call.
* tests/ipc_sem.c (main): Likewise.
* tests/ipc_shm.c (main): Likewise.
2015-03-16 14:26:58 +01:00
7230d0a388 tests: add IPC_STAT to ipc tests, workaround limitiations of old kernels
* tests/ipc_msg.c: Include <errno.h>.
(main): Add a test call with IPC_STAT, handle old kernels MSG_STAT behaviour.
* tests/ipc_sem.c: Include <errno.h>.
(main): Add a test call with IPC_STAT, handle old kernels SEM_STAT behaviour.
* tests/ipc_shm.c: Include <errno.h>.
(main): Add a test call with IPC_STAT, handle old kernels SHM_STAT behaviour.
2015-01-14 16:57:37 +00:00
12e2442784 tests: add tests for ipc syscalls decoding
* tests/ipc_msg.c: New file.
* tests/ipc_sem.c: Likewise.
* tests/ipc_shm.c: Likewise.
* tests/ipc_msg.test: New test.
* tests/ipc_sem.test: Likewise.
* tests/ipc_shm.test: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add ipc_msg, ipc_sem, and ipc_shm.
(TESTS): Add ipc_msg.test, ipc_sem.test, and ipc_shm.test.
* tests/.gitignore: Add ipc_msg, ipc_sem, and ipc_shm.
2015-01-12 16:24:20 +00:00