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.
This commit is contained in:
parent
fa5ce37246
commit
3aa45f3cc2
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user