Commit graph

4,287 commits

Message SHA1
Merge "Move NsdServiceTest to correct directory" am: 6a5c978605 am: ca9fcb79f6
am: ecf4267889

Change-Id: Ib4e100fc8219b58ab7850407735a444dad3ec153

Hugo Benichi   authored and   android-build-merger   commited 2017-05-24 07:15:09 +00:00
f0fdd9a831
NsdServiceInfo: move test to tests/net
This patch also
  - adds a license plate to NsdServiceInfoTest
  - fixes some formatting and style issues
      package name
      uses of canonical junit asserts
  - update NsdServiceInfoTest to not use the deprecated AndroidTestCase

Bug: 62044295
Bug: 32561414
Test: $ runtest frameworks-net passes
Change-Id: Ie5ebb00172aef4eec19e6ecd2b41c4467901b93d

Hugo Benichi   commited 2017-05-24 16:03:43 +09:00
f56aa32b2b
Merge "Move NsdServiceTest to correct directory"
Treehugger Robot   authored and   Gerrit Code Review   commited 2017-05-24 06:47:30 +00:00
6a5c978605
Move NsdServiceTest to correct directory
Test: no functional change
Bug: 62044295
Change-Id: Iad3af646e8d252f84978d1a367878a78c2869982

Hugo Benichi   commited 2017-05-24 14:18:48 +09:00
168489b45d
Merge "Fix NetworkStatsObserversTest" am: bec71d8f9b am: 25282c3e38 am: 814351c843
am: 15dcccb4a1

Change-Id: Ib63c7411e28e48201217c4a164c41d4d3223ca51

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 14:27:13 +00:00
0ab46f90d4
Merge "Fix NetworkStatsObserversTest" am: bec71d8f9b am: 25282c3e38
am: 814351c843

Change-Id: Ice4bb8de4267cba7a15a60838e165fab5ebade72

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 14:18:30 +00:00
15dcccb4a1
Merge "Fix NetworkStatsObserversTest"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-05-23 11:29:48 +00:00
bec71d8f9b
Merge "Fix NetworkStatsAccessTest" am: d8d4bcd3bc am: cdb75d321b am: 85afabc4ec
am: ce5380e12c

Change-Id: I838ae489f7d7a287291a1fc14d9e2f816cc29d14

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 07:09:25 +00:00
9a50c571ff
Merge "Fix NetworkStatsAccessTest" am: d8d4bcd3bc am: cdb75d321b
am: 85afabc4ec

Change-Id: I60f9d8867655a6aa24ee192c772d4c26a96c9bcd

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 07:02:54 +00:00
ce5380e12c
Merge "ConnectivityManager: simplify callback handler" am: 5e6af581e4 am: 7bce658dd6 am: a67fb638fa
am: 0b379f7f69

Change-Id: I8d2373bfd1ae3fabab8f556d2b8c8cfa6310818c

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 06:43:16 +00:00
df117a8b6b
Merge "Fix NetworkStatsAccessTest"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-05-23 06:43:07 +00:00
d8d4bcd3bc
Merge "ConnectivityManager: simplify callback handler" am: 5e6af581e4 am: 7bce658dd6
am: a67fb638fa

Change-Id: I3934666df4a02101351993f7f83fb0a42124a2f5

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 06:37:24 +00:00
0b379f7f69
Merge "ConnectivityManager: simplify callback handler"
Treehugger Robot   authored and   Gerrit Code Review   commited 2017-05-23 06:16:49 +00:00
5e6af581e4
Merge "NsdService: test coverage for client requests."
Hugo Benichi   authored and   Android (Google) Code Review   commited 2017-05-23 05:54:07 +00:00
cb7fcba8d0
Merge "ConnectivityServiceTest: fix flakyness" am: 8222ec90c6 am: 004f36d5bc am: eb9d0f16aa
am: 2d2b500068

Change-Id: I4225fabd1b9af92a7c688e2cfbab3b20e58c53dd

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 05:03:12 +00:00
6bee6bb0b2
Merge "ConnectivityServiceTest: fix flakyness" am: 8222ec90c6 am: 004f36d5bc
am: eb9d0f16aa

Change-Id: Ic792060aafb5aa8b485054be18c3dba82bb15a3b

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 04:56:41 +00:00
2d2b500068
Merge "ConnectivityServiceTest: fix flakyness"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-05-23 04:35:11 +00:00
8222ec90c6
NsdService: test coverage for client requests.
Adding coverage for:
  - NsdManager client disconnection
  - in-flight request GC

Test: new test passes
Bug: 37013369, 33298084
Bug: 38503832

(cherry picked from commit 0a118cefb8)

Change-Id: I02aca772d88306acae09db739ced7a2b1119b72b

Hugo Benichi   commited 2017-05-23 12:53:55 +09:00
417fa6fcb4
Merge "Merge "ConnectivityManager: improve argument validation" am: 3ca6c89b37 am: 0187514f74 am: b800e8520e" into oc-dev-plus-aosp
am: dd06c9461b

Change-Id: I2a9ba4202ffca20fa4931680f9e3bf4313dcfb6f

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 03:52:00 +00:00
a063d988c6
Merge "ConnectivityManager: improve argument validation" am: 3ca6c89b37 am: 0187514f74
am: b800e8520e

Change-Id: Idfc0938025c633c89f5bfddd88b3721876d085ef

Hugo Benichi   authored and   android-build-merger   commited 2017-05-23 03:41:52 +00:00
ea0c83ccb7
Merge "ConnectivityManager: improve argument validation"
Treehugger Robot   authored and   Gerrit Code Review   commited 2017-05-23 03:14:29 +00:00
3ca6c89b37
ConnectivityManager: simplify callback handler
Bug: 36701874
Test: $ runtest frameworks-net
Change-Id: I4d5f08903a54f8dced7cb6ae86703847b908b784

Hugo Benichi   commited 2017-05-23 10:39:46 +09:00
b6c2406c4c
ConnectivityManager: improve argument validation
Using Preconditions and dedicated static methods for checking arguments
to improve error stack traces without error messages.

Test: covered by previously added unit test
Bug: 36701874
Change-Id: Id872b2c887a4bca43a8c3644622add1c2ee57c6d

Hugo Benichi   commited 2017-05-23 10:39:45 +09:00
bc1104b465
Fix NetworkStatsObserversTest
This patch fixes several spurious unit tests in
NetworkStatsObserversTest by using the updated waitForIdleHandler of
ConnectivityServiceTest. More specifically this fixes the following
tests:
  - testUnregister_knownRequest_releasesCaller
  - testUpdateStats_deviceAccess_notifies
  - testUpdateStats_userAccess_usageSameUser_notifies
  - testUpdateStats_defaultAccess_notifiesSameUid

This patch also removes the dummy message with type -1 sent at the end
of tests in NetworkStatsObserversTest and the associated assert, because
nothing is exercised or asserted immediately after.

This patch also updates NetworkStatsObserversTest to not depend on the
deprecated junit.framework.TestCase.

Bug: 32561414
Test: runtest -x frameworks/base/tests/../NetworkStatsObserversTest.java
Change-Id: I4fc909ee9bacc964c859fa7a3db34f9dc86b89cf

Hugo Benichi   commited 2017-05-23 10:18:41 +09:00
a2a3380def
Fix NetworkStatsAccessTest
This patch fixes NetworkStatsAccessTest by taking into account
DEVICESUMMARY which was added in commit
3a8b343ce5220086c4f71e63f5d42f2d28434c4b.

Doing $ git revert 3a8b343ce5220086c4f71e63f5d42f2d28434c4b shows that
the existing assertions of NetworkStatsAccessTest passed before that
commit.

This patch also changes NetworkStatsAccessTest to use up-to-date testing
style and not depend on the deprecated junit.framework.TestCase.

Bug: 32561414
Test: runtest -x frameworks/base/../NetworkStatsAccessTest.java
Change-Id: Ib78f137578cf35e1c766b377b7f812a09173c49e

Hugo Benichi   commited 2017-05-23 10:18:41 +09:00
de08c23dc9
ConnectivityServiceTest: fix flakyness
This patch attempts to fix the remaining spurious failures in
ConnectivityServiceTest, which have two causes:
 - waitForIdle() does not take into account the NetworkAgents handlers.
 - the deadlines in testRequestBenchmark are sometimes exceeded.

To fix the first issue, waitForIdle() is moved to a test level instance
method and also calls waitForIdleHandler on any non null
MockNetworkAgent. This is expected to fix spurious errors for the
following tests:
  - testMobildeDataAlwaysOn
  - testLingering
  - testPacketKeepAlive
  - testMMSonWiFi

To fix the second issue, the deadlines for testRequestBenchmark are
extended by 10ms. Also, the failure message is made more actionable by
providing the total time it took for the operation, instead of printing
the number of dispatches that were achieved before the deadline.

Bug: 32561414
Test: tests pass many times in a row (~500).
Change-Id: Id33c6ac1edfb0b89634fa7789dccb2da237e2709

Hugo Benichi   commited 2017-05-23 10:18:41 +09:00
ea4148caa3
Merge "Address ConnectivityManager API comments." am: 37c09c96b9 am: b57db6ef97 am: 08ab9ea526
am: 85c5572cc2

Change-Id: I4ba08fdfca51cbc11866e941dab76f2926f796b1

Hugo Benichi   authored and   android-build-merger   commited 2017-05-19 23:46:46 +00:00
291d48ad0d
Merge "Address ConnectivityManager API comments." am: 37c09c96b9 am: b57db6ef97
am: 08ab9ea526

Change-Id: I8e5e44043bb7efde3e21650e7edf3f121aff1e6e

Hugo Benichi   authored and   android-build-merger   commited 2017-05-19 23:36:09 +00:00
85c5572cc2
Merge "Address ConnectivityManager API comments."
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-05-19 23:05:57 +00:00
37c09c96b9
Merge "Add a method to start the captive portal login app." am: a4876e64b8 am: f238a96172 am: 6246ddc338
am: b1dfaef01b

Change-Id: I29f04d352d601da18df193f3f46b2f6ff60d7ffd

Hugo Benichi   authored and   android-build-merger   commited 2017-05-19 03:05:31 +00:00
37b21cafcb
Merge "Add a method to start the captive portal login app." am: a4876e64b8 am: f238a96172
am: 6246ddc338

Change-Id: I0f5d39394d35d2977c81b704ded1d1119bcf47a7

Hugo Benichi   authored and   android-build-merger   commited 2017-05-19 02:56:58 +00:00
b1dfaef01b
Merge "Add test coverage for explicitlySelected networks." am: f6db1c5889 am: 3d55c5539c am: b7535c86a0
am: 4f58f0cde4

Change-Id: Ie104d3b939e99f67dd3267e16f6c27c403162453

Lorenzo Colitti   authored and   android-build-merger   commited 2017-05-19 02:43:31 +00:00
2439b554d5
Merge "Add test coverage for explicitlySelected networks." am: f6db1c5889 am: 3d55c5539c
am: b7535c86a0

Change-Id: I4caf9f55edeb51365293558db9d7d028b61c501c

Lorenzo Colitti   authored and   android-build-merger   commited 2017-05-19 02:34:58 +00:00
4f58f0cde4
Merge "Add a method to start the captive portal login app."
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-05-19 02:29:21 +00:00
a4876e64b8
Merge "Add test coverage for explicitlySelected networks."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2017-05-19 02:05:55 +00:00
f6db1c5889
Add a method to start the captive portal login app.
Bug: 36203355
Bug: 36656914
Test: ConnectivityServiceTest (including new test) passes
Change-Id: Ide82858af67024623560ab79beea27c201b63447
Merged-In: I82a9a9a8da47870ba3f1bbef5941b37e970c844f

(cherry picked from commit 500dbae1b5)

Lorenzo Colitti   authored and   Hugo Benichi   commited 2017-05-19 00:58:41 +00:00
de1e515306
Merge "Expand logging capabilities of Tethering subsystem" am: 29f9f2d546 am: 96f9371a66 am: 945ff184c2
am: 4d8918ea55

Change-Id: I2644f518304a03da469fb9c2aa01a6d8f1a97901

Erik Kline   authored and   android-build-merger   commited 2017-05-18 04:04:57 +00:00
d24b91c6e9
Merge "Expand logging capabilities of Tethering subsystem" am: 29f9f2d546 am: 96f9371a66
am: 945ff184c2

Change-Id: Ia9d15f0dcc49ce070f8684eb8c8481310859faa5

Erik Kline   authored and   android-build-merger   commited 2017-05-18 03:54:30 +00:00
4d8918ea55
Merge "Fix NetworkNotificationManagerTest" am: c13a80deee am: 13f0d10115 am: 31c566037b
am: e229dc8bca

Change-Id: I000077352ab0e1af7209a266be0309607034dbea

Hugo Benichi   authored and   android-build-merger   commited 2017-05-18 03:50:46 +00:00
9290b73f9d
Merge "Fix NetworkNotificationManagerTest" am: c13a80deee am: 13f0d10115
am: 31c566037b

Change-Id: Ib880777290f74eaa565839632eb7518642fcc4f3

Hugo Benichi   authored and   android-build-merger   commited 2017-05-18 03:44:20 +00:00
e229dc8bca
Merge "Expand logging capabilities of Tethering subsystem"
Treehugger Robot   authored and   Gerrit Code Review   commited 2017-05-18 03:25:30 +00:00
29f9f2d546
Merge "Move NetworkNotificationManagerTest to tests/net" am: d44389ec64 am: 9fdc903af7 am: 777bf77c2c -s ours
am: 304db7129a

Change-Id: Ibba873042627166120f4040896c58e96bff2b085

Hugo Benichi   authored and   android-build-merger   commited 2017-05-18 02:47:54 +00:00
b3a9b00d50
Merge "Move NetworkNotificationManagerTest to tests/net" am: d44389ec64 am: 9fdc903af7
am: 777bf77c2c  -s ours

Change-Id: I0f63e4f29228a404ec0dac3571b2474806e4c8d6

Hugo Benichi   authored and   android-build-merger   commited 2017-05-18 02:40:26 +00:00
304db7129a
Fix NetworkNotificationManagerTest
The testNotificationsShownAndCleared test was not doing anything
because the list of notification to show was always empty.

This patch fixes this issue and actually makes the test loop on
non-empty collections, and also fixes another ordering issue in
assertions themselves, hidden until now by the first issue.

Bug: 32561414
Test: runtest -x frameworks/base/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java
Merged-In: I4837b1175d7c9133e9156e33acaa1e7e3341cc62
Change-Id: Ia30587bd68a87b83b62f57eeeb28fef7d95dbf81

(cherry picked from commit 9eec272054)

Hugo Benichi   commited 2017-05-18 11:08:31 +09:00
343091956d
Merge "Move NetworkNotificationManagerTest to tests/net"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-05-18 02:01:40 +00:00
d44389ec64
Merge "Finish moving NetworkStats tests to tests/net" am: e1a0562a3f am: cd821b231a am: 544bcbe78e
am: 67615a5906

Change-Id: I663f5ae4f1e15bd39e8ed927ac71958818452967

Hugo Benichi   authored and   android-build-merger   commited 2017-05-18 00:57:00 +00:00
1ed8f6a917
Merge "Finish moving NetworkStats tests to tests/net" am: e1a0562a3f am: cd821b231a
am: 544bcbe78e

Change-Id: I5d9a01a5804a7cc6289253db09078ede00fc0dc5

Hugo Benichi   authored and   android-build-merger   commited 2017-05-18 00:48:14 +00:00
67615a5906
Expand logging capabilities of Tethering subsystem
Introduce a SharedLog that can be shared among all Tethering
components.  All log entries go to the same log, and each includes
its subsystem name.  Additionally, all entries emitted to the
system log shared the same tag, so can easily be watched.

More subsystems can inherit a SharedLog, but to minimize cherry-pick
conflicts we limit ourselves to these changes only.

Test: as follows
    - built
    - flashed
    - booted
    - log output observed via dumpsys
    - runtest frameworks-net passes
Bug: 32163131
Bug: 36988090
Bug: 38218697
Change-Id: I1229d4c55987402d84b0d4a2c8a595e0c829aa3e

Erik Kline   commited 2017-05-18 09:46:45 +09:00
d364a24856
Merge "Finish moving NetworkStats tests to tests/net"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-05-18 00:09:54 +00:00
e1a0562a3f
Merge "Add tethering offload HAL call via JNI" am: 043ad49e0f am: f421d60824 am: c967d56ad7 -s ours
am: 06310ff3c6  -s ours

Change-Id: Iab8e98fdc4d7e4cf682dd4dffec3d64e6cef2556

Erik Kline   authored and   android-build-merger   commited 2017-05-17 18:23:09 +00:00
99a735b79c