[PATCH] tests/ipc_sem: match IPC_64 flag

Andreas Schwab schwab at suse.de
Thu Mar 12 10:07:18 UTC 2015


* ipc_sem.c (main): Optionally match "IPC_64|" in third arg of
semctl.
---
 tests/ipc_sem.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/ipc_sem.c b/tests/ipc_sem.c
index 180dc12..9a9cd20 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:
-- 
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