summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2023-04-20 16:47:44 +0000
committerMaciej Żenczykowski <maze@google.com>2023-04-20 16:48:16 +0000
commit8c18fcafeeaec82c81339e27952e54cf16146995 (patch)
tree1fb0f961df9eba385b4c55ed7a713902625acfd2 /tests
parent398ca80e661bb8da58f7ad38e1554287473904bf (diff)
downloadnetd-8c18fcafeeaec82c81339e27952e54cf16146995.tar.gz
better error on failure
Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I1ac825f27ada81c8a769d2bd6ff7fb52360a5b4a
Diffstat (limited to 'tests')
-rw-r--r--tests/binder_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/binder_test.cpp b/tests/binder_test.cpp
index 423d3833..c85de3ae 100644
--- a/tests/binder_test.cpp
+++ b/tests/binder_test.cpp
@@ -1068,13 +1068,13 @@ TEST_F(NetdBinderTest, SocketDestroyLinkLocal) {
// The client sockets on sTun2 are closed, but the ones on sTun1 remain open.
char buf[1024];
EXPECT_EQ(-1, read(c2, buf, sizeof(buf)));
- EXPECT_TRUE(errno == ECONNABORTED || errno == ECONNRESET);
+ EXPECT_TRUE(errno == ECONNABORTED || errno == ECONNRESET) << "errno:" << errno;
// The blocking read above ensures that SOCK_DESTROY has completed.
EXPECT_EQ(3, write(a1, "foo", 3));
EXPECT_EQ(3, read(c1, buf, sizeof(buf)));
EXPECT_EQ(-1, write(a2, "foo", 3));
- EXPECT_TRUE(errno == ECONNABORTED || errno == ECONNRESET);
+ EXPECT_TRUE(errno == ECONNABORTED || errno == ECONNRESET) << "errno:" << errno;
// Check the server sockets too.
EXPECT_EQ(-1, accept(s1, nullptr, 0));