[PATCH] tests/ipc_sem: don't match address of sem buffer
Andreas Schwab
schwab at suse.de
Wed Mar 11 12:07:15 UTC 2015
On architectures where the semctl call is implemented by the ipc syscall
the glibc wrapper passes a pointer to a local variable, so the value of
the fourth argument is unknown.
* ipc_sem.c (main): Don't try to match address of sem buffer.
---
tests/ipc_sem.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/ipc_sem.c b/tests/ipc_sem.c
index eddddd4..e8662c4 100644
--- a/tests/ipc_sem.c
+++ b/tests/ipc_sem.c
@@ -16,12 +16,12 @@ main(void)
if (semctl(id, 0, IPC_STAT, &ds))
goto fail;
- printf("semctl\\(%d, 0, IPC_STAT, %p\\) += 0\n", id, &ds);
+ printf("semctl\\(%d, 0, IPC_STAT, .*\\) += 0\n", id);
int max = semctl(0, 0, SEM_INFO, &info);
if (max < 0)
goto fail;
- printf("semctl\\(0, 0, SEM_INFO, %p\\) += %d\n", &info, max);
+ printf("semctl\\(0, 0, SEM_INFO, .*\\) += %d\n", max);
rc = semctl(id, 0, SEM_STAT, &ds);
if (rc != id) {
@@ -31,9 +31,9 @@ main(void)
*/
if (-1 != rc || EINVAL != errno)
goto fail;
- printf("semctl\\(%d, 0, SEM_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds);
+ printf("semctl\\(%d, 0, SEM_STAT, .*\\) += -1 EINVAL \\(Invalid argument\\)\n", id);
} else {
- printf("semctl\\(%d, 0, SEM_STAT, %p\\) += %d\n", id, &ds, id);
+ printf("semctl\\(%d, 0, SEM_STAT, .*\\) += %d\n", id, id);
}
rc = 0;
--
2.3.2
--
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Strace-devel
mailing list