From 92af733ee202caa3b5475fe27fcc81582f11e7c8 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 30 Apr 2015 17:32:03 -0700 Subject: More adb buffer fixes. This patch factors out a lot of the basic protocol code: sending OKAY, sending FAIL, and sending a length-prefixed string. ADB_TRACE has been non-optional for a long time, so let's just remove the #ifs. Also actually build the device tracker test tool (and remove its duplicate). Bug: http://b/20666660 Change-Id: I6c7d59f18707bdc62ca69dea45547617f9f31fc6 (cherry picked from commit e67f1f87d9b1188ec8617035db7006c37ee7b21e) --- adb/adb_io_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'adb/adb_io_test.cpp') diff --git a/adb/adb_io_test.cpp b/adb/adb_io_test.cpp index da340b2..dd09919 100644 --- a/adb/adb_io_test.cpp +++ b/adb/adb_io_test.cpp @@ -139,13 +139,13 @@ TEST(io, WriteFdExactly_ENOSPC) { ASSERT_EQ(ENOSPC, errno); } -TEST(io, WriteStringFully) { +TEST(io, WriteFdExactly_string) { const char str[] = "Foobar"; TemporaryFile tf; ASSERT_NE(-1, tf.fd); // Test writing a partial string to the file. - ASSERT_TRUE(WriteStringFully(tf.fd, str)) << strerror(errno); + ASSERT_TRUE(WriteFdExactly(tf.fd, str)) << strerror(errno); ASSERT_EQ(0, lseek(tf.fd, SEEK_SET, 0)); std::string s; -- cgit v1.1