History log of /system/core/adb/shell_service_protocol_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef57d54f80774701eee8bdb45185fb33e5ced473 20-Oct-2016 Ting-Yuan Huang <laszio@google.com> adb: fix undefined behavior

system/core/adb/shell_service_protocol_test.cpp:94:14: warning: Null
passed to a callee that requires a non-null 1st parameter
!memcmp(data, protocol->data(), data_length));

C99 requires memcmp() to take non-null pointers.

Bug: none
Test: clang-tidy doesn't complain
Change-Id: I77b8d9373fa257a070ffc7fd318231c2c9ea84c3
/system/core/adb/shell_service_protocol_test.cpp
b404dec85ab07043c0a1933671aa76a159d797ac 12-Sep-2015 David Pursell <dpursell@google.com> adb: fix shell_service_protocol_test for Windows.

Adds missing #ifdef guards to shell_service_protocol_test.cpp so the
test compiles on Windows.

Also fixes a bug in Windows socketpair write implementation. Previously
it was only checking for a closed pipe if the write happened to block.
This adds an additional pre-check to exit immediately on a closed pipe.

These two changes allow the test to compile and pass on Windows.

Change-Id: Ib8853ed72f015fc0d623da47c32982cb3ffa4a3d
/system/core/adb/shell_service_protocol_test.cpp
b9e2e84e7e3cc5c9f30d63ef7d1337363437d2c7 01-Sep-2015 David Pursell <dpursell@google.com> adb: create shell protocol class (take 2).

Adds a new class ShellProtocol to help read and write data with
`adb shell`. This will allow splitting streams and sending out-of-band
data such as exit codes.

Nothing uses the new class yet except the unit tests.

This is the second attempt at this CL, the first is at
http://r.android.com/169600. The problems was using sighandler_t
which is not available on mac. sig_t is used instead which is available
due to _GNU_SOURCE being defined in Android.mk, which causes
_BSD_SOURCE -> __USE_BSD -> sig_t to be defined. Nothing else has been
changed from the original CL.

Bug: http://b/23030641
Change-Id: I7bd7f5a82ad811fbca7a3eee1236d2c55ae57c48
/system/core/adb/shell_service_protocol_test.cpp
d9b74192b8351c99dc0baf53f6e652edb443d1d1 06-Sep-2015 David Pursell <dpursell@google.com> Revert "adb: create shell protocol class."

This CL broke the mac build. I'll revert for now and take a look at how to get it working next week.

This reverts commit 73096f2e1d87da571187515af6aa7c2171a70693.

Change-Id: Icb3e015250bcbbc69a45675a1358699ebe01e77b
/system/core/adb/shell_service_protocol_test.cpp
73096f2e1d87da571187515af6aa7c2171a70693 01-Sep-2015 David Pursell <dpursell@google.com> adb: create shell protocol class.

Adds a new class ShellProtocol to help read and write data with
`adb shell`. This will allow splitting streams and sending out-of-band
data such as exit codes.

Nothing uses the new class yet except the unit tests.

Bug: http://b/23030641

Change-Id: Ieb02e127095c6dda25b7cb188a2e599173fd97e6
/system/core/adb/shell_service_protocol_test.cpp