History log of /system/core/adb/transport_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0cd3ae1c281fa890389987cd05b2bf01cdf1e4c5 21-Sep-2016 Josh Gao <jmgao@google.com> adb: kill adb_mutex_t, adb_cond_t.

Now that we have support for std::mutex and std::condition_variable on
Windows, remove our mutex compatibility layer in favor of the C++ one.

Bug: http://b/31653591
Test: mma && $ANDROID_HOST_OUT/nativetest64/adb_test/adb_test && \
python test_adb.py && python test_device.py
(also on Windows)

Change-Id: I5b7ed9c45cc2a32edcf4e77b56dc28e441f15f34
/system/core/adb/transport_test.cpp
7f27490e7f386401dc38287a67dcb8826e2260c5 18-Apr-2016 Yabin Cui <yabinc@google.com> Fix kick_transport test.

Fix broken kick_transport test, and make it not access atransport
internal variables.

Bug: 25935458
Change-Id: I91b4d32a222b2f369f801bbe3903acac9c8ea4f7
/system/core/adb/transport_test.cpp
3f902aad5b427a8162bf860a758878b55b13e775 01-Mar-2016 David Pursell <dpursell@google.com> adb: relax serial matching rules.

Currently targeting a device by serial requires matching the serial
number exactly. This CL relaxes the matching rules for local transports
to ignore protocol prefixes and make the port optional:
[tcp:|udp:]<hostname>[:port]

The purpose of this is to allow a user to set ANDROID_SERIAL to
something like "tcp:100.100.100.100" and have it work for both fastboot
and adb (assuming the device comes up at 100.100.100.100 in both
modes).

This CL also adds some unit tests for the modified functions to make
sure they work as expected.

Bug: 27340240
Change-Id: I006e0c70c84331ab44d05d0a0f462d06592eb879
/system/core/adb/transport_test.cpp
9f4861155447ce813d06f39ea7b739837b1a4e2d 24-Feb-2016 Josh Gao <jmgao@google.com> adb: fix leak of framework_fd.

Move the fdevent for the framework authentication connection out of
atransport into its own static variable in adb_auth_client, since its
lifetime is completely unrelated to that of the USB connection.

Bug: http://b/27297963
Change-Id: Ie6180d0b59d133120c5755e239e76ab33ed3cc1d
/system/core/adb/transport_test.cpp
d2b588e23901538f4b459a71fefdac6fc2748f7e 25-Sep-2015 David Pursell <dpursell@google.com> adb: fix adbd feature parsing for no features.

Previously the transport features list was only overwritten if a
new feature list was found. However, adbd can reuse the same atransport
object even if the adb server is killed and restarted, so the feature
list was not cleared properly if the newly started adb server didn't
provide one.

This CL fixes the bug by clearing the transport features list whenever
a connection banner is parsed.

Bug: http://b/24405971
Change-Id: Ia6ee6c9a46a621534681f6d4d7df77156b885eb9
/system/core/adb/transport_test.cpp
4e2fd36bc8c16147cab323b0418a7666812d3bc7 22-Sep-2015 David Pursell <dpursell@google.com> adb: add -Tt options to `adb shell`.

Adds -T (no PTY) and -t (force PTY) options to `adb shell` to mimic
ssh options. Small cleanup to send an entire FeatureSet to the adb
client at once to avoid multiple round-trips when querying multiple
features.

Known issue: humans using `adb shell -T` to start a non-PTY interactive
session may experience problems since neither side will have PTY
features like echoing or newline translation. This is probably OK for
now as the -Tt options are primarily useful for scripting.

Bug: http://b/23825231
Change-Id: I4d0df300db0abd1f7410bab59dd4d5b991babda7
/system/core/adb/transport_test.cpp
b329824e6c5373ae303269dca285d835ce57e514 29-Aug-2015 Yabin Cui <yabinc@google.com> adb: clean up transport disconnect operations.

Move operations from global functions into member functions.
Add unit test.

Change-Id: Id4543d8e78541eb08c8e629f180c605c699737ec
/system/core/adb/transport_test.cpp
1792c23cb892ab58590b2cdfce0d0ece30c21787 18-May-2015 Dan Albert <danalbert@google.com> Add feature list to connection banner.

This allows us to test for features explicitly rather than relying on
the protocol version number, allowing us to fall back gracefully if a
feature is not supported.

This will be needed for the upcoming shell upgrades for stdout/stderr
separation and exit code reporting.

Change-Id: Ibb1d8ad2611f7209901ee76d51346b453e9c5873
/system/core/adb/transport_test.cpp
cf168a82e99e97e3ad95e37b7065f6b8e7f7390b 25-May-2015 Spencer Low <CompareAndSwap@gmail.com> adb_test/libbase_test: win32: get some tests working

adb_test:

* Fix adb_utils directory_exists test for Windows. The test actually
fails because directory_exists() is not aware of junctions or symlinks,
but I'm not really sure if that is a bad thing (since these are rare on
Windows to begin with).

* Fix crash during transport tests due to mutex not being initialized.

* io tests fail for various reasons (see adb_io_test.cpp for more info).

libbase_test:

* Get it building on Win32 by implementing mkstemp() and mkdtemp().

* Run StringPrintf %z test on Windows because it passes because we build
with __USE_MINGW_ANSI_STDIO which implements %z.

* I didn't fixup the logging tests: some logging tests fail because when
abort() is called on Windows, by default it pops up UI asking whether a
crash dump should be sent to Microsoft. To some degree this makes sense,
as I think LOG(FATAL) does crash dumping in Chromium. This should be
revisited in the future.

Change-Id: Iaa2433e5294ff162e0b2aa9fe6e4ec09a6893f7a
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
/system/core/adb/transport_test.cpp
c7915a3470292349017f94ca066ed515babfcc23 19-May-2015 Dan Albert <danalbert@google.com> Make atransport be a real class.

Using non-POD types in atransport means we'll need to start treating
it as a real class (specifically with regards to new/delete rather
than malloc/free).

I've also cleaned up the home grown linked lists for transport_list
and pending_list to just be std::lists. We might want to refactor that
again to be an std::unordered_map keyed on serial, since that seems to
be a common way to search it.

Change-Id: I7f5e23cdc47944a9278099723ca029585fe52105
/system/core/adb/transport_test.cpp
055f1aa4ff58ba71133d506b202ad46612758ded 21-Feb-2015 Dan Albert <danalbert@google.com> Add some basic tests to adb.

Change-Id: I946b5b1e5650540db3b4f75892214c4218b3baf3
/system/core/adb/transport_test.cpp