print_sigevent: fix field names of sigev_value structure

* print_sigevent.c (print_sigevent): Change "int" to "sival_int", "ptr"
to "sival_ptr".
* tests/mq_sendrecv.c (main): Update expected output in accordance with
fixed field names.
* tests/timer_create.c (main): Likewise.
This commit is contained in:
Eugene Syromyatnikov 2016-11-28 22:12:12 +03:00 committed by Dmitry V. Levin
parent 6602da1b90
commit c84536f975
3 changed files with 19 additions and 18 deletions

View File

@ -44,7 +44,7 @@ MPERS_PRINTER_DECL(void, print_sigevent, struct tcb *tcp, const long addr)
tprints("{");
if (sev.sigev_value.sival_ptr) {
tprintf("sigev_value={int=%d, ptr=",
tprintf("sigev_value={sival_int=%d, sival_ptr=",
sev.sigev_value.sival_int);
printaddr((unsigned long) sev.sigev_value.sival_ptr);
tprints("}, ");

View File

@ -372,7 +372,7 @@ main(void)
/* Invalid SIGEV_* */
rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}"
printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}"
", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}) = %s\n",
(int) bogus_fd, bogus_sev->sigev_value.sival_int,
bogus_sev->sigev_value.sival_ptr,
@ -382,7 +382,7 @@ main(void)
/* SIGEV_NONE */
bogus_sev->sigev_notify = SIGEV_NONE;
rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}, "
printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, "
"sigev_signo=%u, sigev_notify=SIGEV_NONE}) = %s\n",
(int) bogus_fd, bogus_sev->sigev_value.sival_int,
bogus_sev->sigev_value.sival_ptr,
@ -392,7 +392,7 @@ main(void)
bogus_sev->sigev_notify = SIGEV_SIGNAL;
bogus_sev->sigev_signo = SIGALRM;
rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}, "
printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, "
"sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}) = %s\n",
(int) bogus_fd, bogus_sev->sigev_value.sival_int,
bogus_sev->sigev_value.sival_ptr, sprintrc(rc));
@ -404,7 +404,7 @@ main(void)
bogus_sev->sigev_un.sigev_thread.attribute =
(unsigned long) 0xcafef00dfacefeedULL;
rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}, "
printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, "
"sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD, "
"sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}) = "
"%s\n",

View File

@ -53,9 +53,9 @@ main(void)
};
syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL);
printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}"
", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}"
", NULL) = -1 %s (%m)\n",
printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, "
"sival_ptr=%#lx}, sigev_signo=%u, "
"sigev_notify=%#x /* SIGEV_??? */}, NULL) = -1 %s (%m)\n",
sev.sigev_value.sival_int,
sev.sigev_value.sival_ptr,
sev.sigev_signo, sev.sigev_notify,
@ -64,8 +64,9 @@ main(void)
sev.sigev_notify = SIGEV_NONE;
if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0]))
perror_msg_and_skip("timer_create CLOCK_REALTIME");
printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}"
", sigev_signo=%u, sigev_notify=SIGEV_NONE}, [%d]) = 0\n",
printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, "
"sival_ptr=%#lx}, sigev_signo=%u, sigev_notify=SIGEV_NONE}, "
"[%d]) = 0\n",
sev.sigev_value.sival_int,
sev.sigev_value.sival_ptr,
sev.sigev_signo, tid[0]);
@ -74,9 +75,9 @@ main(void)
sev.sigev_signo = SIGALRM;
if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[1]))
perror_msg_and_skip("timer_create CLOCK_MONOTONIC");
printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}"
", sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}"
", [%d]) = 0\n",
printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, "
"sival_ptr=%#lx}, sigev_signo=SIGALRM, "
"sigev_notify=SIGEV_SIGNAL}, [%d]) = 0\n",
sev.sigev_value.sival_int,
sev.sigev_value.sival_ptr, tid[1]);
@ -87,8 +88,8 @@ main(void)
(unsigned long) 0xcafef00dfacefeedULL;
if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2]))
perror_msg_and_skip("timer_create CLOCK_REALTIME");
printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}"
", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD"
printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, "
"sival_ptr=%#lx}, sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD"
", sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}"
", [%d]) = 0\n",
sev.sigev_value.sival_int,
@ -104,9 +105,9 @@ main(void)
sev.sigev_un.tid = getpid();
if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3]))
perror_msg_and_skip("timer_create CLOCK_MONOTONIC");
printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}"
", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD_ID"
", sigev_notify_thread_id=%d}"
printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, "
"sival_ptr=%#lx}, sigev_signo=SIGALRM, "
"sigev_notify=SIGEV_THREAD_ID, sigev_notify_thread_id=%d}"
", [%d]) = 0\n",
sev.sigev_value.sival_int,
sev.sigev_value.sival_ptr,