Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/librumphijack print out the unexpected rv too
details: https://anonhg.NetBSD.org/src/rev/858305af01fe
branches: trunk
changeset: 763019:858305af01fe
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Mar 08 14:53:03 2011 +0000
description:
print out the unexpected rv too
diffstat:
tests/lib/librumphijack/h_client.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 9726d725c50f -r 858305af01fe tests/lib/librumphijack/h_client.c
--- a/tests/lib/librumphijack/h_client.c Tue Mar 08 12:42:14 2011 +0000
+++ b/tests/lib/librumphijack/h_client.c Tue Mar 08 14:53:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_client.c,v 1.4 2011/03/01 08:54:18 pooka Exp $ */
+/* $NetBSD: h_client.c,v 1.5 2011/03/08 14:53:03 pooka Exp $ */
/*
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
exit(0);
} else if (strcmp(argv[1], "invafd") == 0) {
struct pollfd pfd[2];
- int fd;
+ int fd, rv;
fd = open("/rump/dev/null", O_RDWR);
if (fd == -1)
@@ -107,8 +107,8 @@
pfd[1].fd = fd;
pfd[1].events = POLLIN;
- if (poll(pfd, 2, INFTIM) != 1)
- errx(1, "poll unexpected rv");
+ if ((rv = poll(pfd, 2, INFTIM)) != 1)
+ errx(1, "poll unexpected rv %d (%d)", rv, errno);
if (pfd[1].revents != POLLNVAL || pfd[0].revents != 0)
errx(1, "poll unexpected revents");
Home |
Main Index |
Thread Index |
Old Index