[PATCH] tests/ipc_*: match IPC_64 flag
Andreas Schwab
schwab at suse.de
Mon Mar 16 11:23:16 UTC 2015
* ipc_msg.c (main): Optionally match "IPC_64|" in the third
argument of the ipc call.
* ipc_sem.c (main): Likewise.
* ipc_shm.c (main): Likewise.
---
tests/ipc_msg.c | 10 +++++-----
tests/ipc_sem.c | 10 +++++-----
tests/ipc_shm.c | 10 +++++-----
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/tests/ipc_msg.c b/tests/ipc_msg.c
index 1917086..ed2bfd6 100644
--- a/tests/ipc_msg.c
+++ b/tests/ipc_msg.c
@@ -15,12 +15,12 @@ main(void)
if (msgctl(id, IPC_STAT, &ds))
goto fail;
- printf("msgctl\\(%d, IPC_STAT, %p\\) += 0\n", id, &ds);
+ printf("msgctl\\(%d, (IPC_64\\|)?IPC_STAT, %p\\) += 0\n", id, &ds);
int max = msgctl(0, MSG_INFO, &ds);
if (max < 0)
goto fail;
- printf("msgctl\\(0, MSG_INFO, %p\\) += %d\n", &ds, max);
+ printf("msgctl\\(0, (IPC_64\\|)?MSG_INFO, %p\\) += %d\n", &ds, max);
rc = msgctl(id, MSG_STAT, &ds);
if (rc != id) {
@@ -30,16 +30,16 @@ main(void)
*/
if (-1 != rc || EINVAL != errno)
goto fail;
- printf("msgctl\\(%d, MSG_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds);
+ printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds);
} else {
- printf("msgctl\\(%d, MSG_STAT, %p\\) += %d\n", id, &ds, id);
+ printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += %d\n", id, &ds, id);
}
rc = 0;
done:
if (msgctl(id, IPC_RMID, 0) < 0)
return 1;
- printf("msgctl\\(%d, IPC_RMID, 0\\) += 0\n", id);
+ printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, 0\\) += 0\n", id);
return rc;
fail:
diff --git a/tests/ipc_sem.c b/tests/ipc_sem.c
index 9373482..d92ec60 100644
--- a/tests/ipc_sem.c
+++ b/tests/ipc_sem.c
@@ -26,13 +26,13 @@ main(void)
un.buf = &ds;
if (semctl(id, 0, IPC_STAT, un))
goto fail;
- printf("semctl\\(%d, 0, IPC_STAT, %p\\) += 0\n", id, &ds);
+ printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_STAT, %p\\) += 0\n", id, &ds);
un.__buf = &info;
int max = semctl(0, 0, SEM_INFO, un);
if (max < 0)
goto fail;
- printf("semctl\\(0, 0, SEM_INFO, %p\\) += %d\n", &info, max);
+ printf("semctl\\(0, 0, (IPC_64\\|)?SEM_INFO, %p\\) += %d\n", &info, max);
un.buf = &ds;
rc = semctl(id, 0, SEM_STAT, un);
@@ -43,16 +43,16 @@ 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, (IPC_64\\|)?SEM_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds);
} else {
- printf("semctl\\(%d, 0, SEM_STAT, %p\\) += %d\n", id, &ds, id);
+ printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, %p\\) += %d\n", id, &ds, id);
}
rc = 0;
done:
if (semctl(id, 0, IPC_RMID, 0) < 0)
return 1;
- printf("semctl\\(%d, 0, IPC_RMID, 0\\) += 0\n", id);
+ printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, 0\\) += 0\n", id);
return rc;
fail:
diff --git a/tests/ipc_shm.c b/tests/ipc_shm.c
index f1995d3..5888dc6 100644
--- a/tests/ipc_shm.c
+++ b/tests/ipc_shm.c
@@ -15,12 +15,12 @@ main(void)
if (shmctl(id, IPC_STAT, &ds))
goto fail;
- printf("shmctl\\(%d, IPC_STAT, %p\\) += 0\n", id, &ds);
+ printf("shmctl\\(%d, (IPC_64\\|)?IPC_STAT, %p\\) += 0\n", id, &ds);
int max = shmctl(0, SHM_INFO, &ds);
if (max < 0)
goto fail;
- printf("shmctl\\(0, SHM_INFO, %p\\) += %d\n", &ds, max);
+ printf("shmctl\\(0, (IPC_64\\|)?SHM_INFO, %p\\) += %d\n", &ds, max);
rc = shmctl(id, SHM_STAT, &ds);
if (rc != id) {
@@ -30,16 +30,16 @@ main(void)
*/
if (-1 != rc || EINVAL != errno)
goto fail;
- printf("shmctl\\(%d, SHM_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds);
+ printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += -1 EINVAL \\(Invalid argument\\)\n", id, &ds);
} else {
- printf("shmctl\\(%d, SHM_STAT, %p\\) += %d\n", id, &ds, id);
+ printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += %d\n", id, &ds, id);
}
rc = 0;
done:
if (shmctl(id, IPC_RMID, 0) < 0)
return 1;
- printf("shmctl\\(%d, IPC_RMID, 0\\) += 0\n", id);
+ printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, 0\\) += 0\n", id);
return rc;
fail:
--
2.3.3
--
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