Fix netclient test and add it to test mapping
Bug: 134356964
Test: atest netdclient_test
cd system/netd && atest
Change-Id: I1519e541c1018ac1be51467397c40d075ed7b4b6
diff --git a/client/NetdClientTest.cpp b/client/NetdClientTest.cpp
index 6f2fc09..b523ccc 100644
--- a/client/NetdClientTest.cpp
+++ b/client/NetdClientTest.cpp
@@ -36,9 +36,10 @@
pollfd fds[1] = {{.fd = dnsProxyFd, .events = POLLIN}};
enum { SERVERFD = 0 };
- const int s = TEMP_FAILURE_RETRY(poll(fds, std::size(fds), -1));
- if (s <= 0) break;
+ int poll_result = TEMP_FAILURE_RETRY(poll(fds, std::size(fds), -1));
+ ASSERT_GT(poll_result, 0);
+ if (fds[SERVERFD].revents & POLLERR) return;
if (fds[SERVERFD].revents & POLLIN) {
char buf[4096];
TEMP_FAILURE_RETRY(read(fds[SERVERFD].fd, &buf, sizeof(buf)));