Fix tests/sys/kqueue NetBSD tests on 32-bit platforms by using proper

format specifier for pointers when printing them out with printf(3)

MFC after:	57 days
Pointyhat to:	ngie
Reported by:	bz, cy, Jenkins (i386 job)
Submitted by:	cy
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2016-09-06 17:22:25 +00:00
parent 5b7d9ae2fd
commit 3d1eb084e9
6 changed files with 24 additions and 0 deletions

View File

@ -78,7 +78,11 @@ ATF_TC_BODY(fifo, tc)
RL(n = kevent(kq, NULL, 0, event, 1, NULL));
(void)printf("kevent num %d filt %d flags: %#x, fflags: %#x, "
#ifdef __FreeBSD__
"data: %" PRIdPTR "\n", n, event[0].filter, event[0].flags,
#else
"data: %" PRId64 "\n", n, event[0].filter, event[0].flags,
#endif
event[0].fflags, event[0].data);
ATF_REQUIRE_EQ(event[0].filter, EVFILT_READ);

View File

@ -111,7 +111,11 @@ ATF_TC_BODY(file, tc)
num += n;
(void)printf("kevent num %d flags: %#x, fflags: %#x, data: "
#ifdef __FreeBSD__
"%" PRIdPTR "\n", n, event[0].flags, event[0].fflags,
#else
"%" PRId64 "\n", n, event[0].flags, event[0].fflags,
#endif
event[0].data);
if (event[0].data < 0)

View File

@ -67,7 +67,11 @@ ATF_TC_BODY(pipe, tc)
RL(n = kevent(kq, NULL, 0, event, 1, NULL));
(void)printf("kevent num %d flags: %#x, fflags: %#x, data: "
#ifdef __FreeBSD__
"%" PRIdPTR "\n", n, event[0].flags, event[0].fflags, event[0].data);
#else
"%" PRId64 "\n", n, event[0].flags, event[0].fflags, event[0].data);
#endif
RL(n = read(fds[0], buffer, event[0].data));
buffer[n] = '\0';

View File

@ -103,7 +103,11 @@ h_check(bool check_master)
RL(n = kevent(kq, NULL, 0, event, 1, NULL));
(void)printf("kevent num %d filt %d flags: %#x, fflags: %#x, "
#ifdef __FreeBSD__
"data: %" PRIdPTR "\n", n, event[0].filter, event[0].flags,
#else
"data: %" PRId64 "\n", n, event[0].filter, event[0].flags,
#endif
event[0].fflags, event[0].data);
ATF_REQUIRE_EQ(event[0].filter, EVFILT_READ);

View File

@ -139,7 +139,11 @@ ATF_TC_BODY(proc1, tc)
printf(" NOTE_FORK");
}
if (event[0].fflags & NOTE_CHILD)
#ifdef __FreeBSD__
printf(" NOTE_CHILD, parent = %" PRIdPTR, event[0].data);
#else
printf(" NOTE_CHILD, parent = %" PRId64, event[0].data);
#endif
printf("\n");
}

View File

@ -130,7 +130,11 @@ ATF_TC_BODY(sig, tc)
if (n == 0)
continue;
#ifdef __FreeBSD__
(void)printf("sig: kevent flags: 0x%x, data: %" PRIdPTR " (# "
#else
(void)printf("sig: kevent flags: 0x%x, data: %" PRId64 " (# "
#endif
"times signal posted)\n", event[0].flags, event[0].data);
}