From 6d668180665e313bbda19f8187abf6140e80a7d7 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 15 Apr 2019 19:08:09 -0400 Subject: Googletest export Migrate ZX_WAIT_ASYNC_REPEATING to ZX_WAIT_ASYNC_ONCE ZX_WAIT_ASYNC_REPEATING is deprecated so convert code to use ZX_WAIT_ASYNC_ONCE instead. PiperOrigin-RevId: 243707147 --- googletest/src/gtest-death-test.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index a78ab21..d52cff8 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -888,7 +888,7 @@ int FuchsiaDeathTest::Wait() { // Register to wait for the socket to be readable or closed. status_zx = stderr_socket_.wait_async( port_, kSocketKey, ZX_SOCKET_READABLE | ZX_SOCKET_PEER_CLOSED, - ZX_WAIT_ASYNC_REPEATING); + ZX_WAIT_ASYNC_ONCE); GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK); bool process_terminated = false; @@ -912,7 +912,7 @@ int FuchsiaDeathTest::Wait() { process_terminated = true; } } else if (packet.key == kSocketKey) { - GTEST_DEATH_TEST_CHECK_(ZX_PKT_IS_SIGNAL_REP(packet.type)); + GTEST_DEATH_TEST_CHECK_(ZX_PKT_IS_SIGNAL_ONE(packet.type)); if (packet.signal.observed & ZX_SOCKET_READABLE) { // Read data from the socket. constexpr size_t kBufferSize = 1024; @@ -929,6 +929,10 @@ int FuchsiaDeathTest::Wait() { socket_closed = true; } else { GTEST_DEATH_TEST_CHECK_(status_zx == ZX_ERR_SHOULD_WAIT); + status_zx = stderr_socket_.wait_async( + port_, kSocketKey, ZX_SOCKET_READABLE | ZX_SOCKET_PEER_CLOSED, + ZX_WAIT_ASYNC_ONCE); + GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK); } } else { GTEST_DEATH_TEST_CHECK_(packet.signal.observed & ZX_SOCKET_PEER_CLOSED); -- cgit v0.12