Commit Graph

385 Commits

Author SHA1 Message Date
Erik Kline
48c3c00ee1 Merge "Add additional mocking for Context innards" am: a65aa77c1c am: 35182218d3
am: f22995eed5

Change-Id: Ibde5e3e048236d32ea3c1ba2c2700bb6a75323e6
2017-06-07 09:51:52 +00:00
Erik Kline
35182218d3 Merge "Add additional mocking for Context innards"
am: a65aa77c1c

Change-Id: I7f780c05c46b00457b194bfb13df5814735f0809
2017-06-07 09:40:37 +00:00
Erik Kline
ec37275ec9 Add additional mocking for Context innards
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - cherry-picked to master and verified there as well
Bug: 32163131
Bug: 32561414

Change-Id: I0b5b1b12d55547d08c332c7d274f19f0023a7b07
2017-06-07 17:44:53 +09:00
Erik Kline
6ce08f623c Merge "Support setting upstream parameters." am: faf8d67749 am: 4e5024131b
am: e2018a407a

Change-Id: I8e0f7188ff29b2fd7c34fd2a340c8b4abaac2be7
2017-06-06 05:16:27 +00:00
Erik Kline
4e5024131b Merge "Support setting upstream parameters."
am: faf8d67749

Change-Id: I0be9ad265fa664f0ce6e1e098996b46c88317b97
2017-06-06 04:54:04 +00:00
Erik Kline
7990aef63b Support setting upstream parameters.
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Bug: 34361337
Change-Id: Id88cae4beed7d38aec3d29a0e2f59a5c7e6a9a4e
2017-06-06 12:02:13 +09:00
Erik Kline
729c31c2e9 Merge "Handle Wi-Fi passing explicit interface name and AP/IP mode" am: 3478ff8c9e am: 1536453059
am: 00956c4f7c

Change-Id: I599813c4b4d866623344df56f62ed6a40b4025d6
2017-06-02 05:39:23 +00:00
Erik Kline
1536453059 Merge "Handle Wi-Fi passing explicit interface name and AP/IP mode"
am: 3478ff8c9e

Change-Id: I489f7e6b8ca4af584879a4c9e8f00570da6e400c
2017-06-02 05:26:49 +00:00
Erik Kline
2efb827f61 Handle Wi-Fi passing explicit interface name and AP/IP mode
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 31466854
Bug: 32163131
Bug: 62076211
Change-Id: I3557a9c14f4e9f1de1869084566a179003d98ffe
2017-06-02 12:21:15 +09:00
Erik Kline
9d2abb4b40 Merge "Add a tethering offload settings kill switch" am: 7cf3086f37 am: 503a6952b2
am: 03941982dc

Change-Id: I7e15919817c59579ff6e7b28e858f13c3090ee5c
2017-06-01 08:10:51 +00:00
Erik Kline
503a6952b2 Merge "Add a tethering offload settings kill switch"
am: 7cf3086f37

Change-Id: I13264b4ae23c8754b61ff46cafbb1b5f31bd14a3
2017-06-01 07:59:11 +00:00
Treehugger Robot
7cf3086f37 Merge "Add a tethering offload settings kill switch" 2017-06-01 07:50:35 +00:00
Hugo Benichi
871e6759ac Merge "Fix race condition in NsdManagerTest" am: f2383db747 am: 2dfb494827
am: ba82d646a6

Change-Id: I7efa4f92838428f69a6a7a9fa767fefa47246f69
2017-05-31 13:25:53 +00:00
Hugo Benichi
2dfb494827 Merge "Fix race condition in NsdManagerTest"
am: f2383db747

Change-Id: Ifd731767608e738a271bd5793a462675c2a93123
2017-05-31 13:08:37 +00:00
Erik Kline
92c4db04e5 Add a tethering offload settings kill switch
Check for tether_offload_disabled (defaulting to false if not present)
before starting the OffloadController.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Bug: 34361337
Change-Id: Ifcc0eb1a41f09ad9e717c9252d2d55e69789669b
2017-05-31 20:33:05 +09:00
Hugo Benichi
22143956cf Fix race condition in NsdManagerTest
NsdManagerTest relies on the lastMessage variable to assert the
connection of a client to the service. The asserts in test are done on a
different thread, although the variable was not qualified volatile,
which creates the chance to read a stale value. This patch fixes this
race by marking the variable volatile.

Bug: 32561414
Bug: 62044295
Test: NsdManagerTest works
Change-Id: I0bc2cd8059c6ff8b78a2dda0ba8d6bc7e13ef951
2017-05-31 15:35:54 +09:00
Hugo Benichi
913d39aafe Merge "ConnectivityServiceTest: more tweaks to testRequestBenchmark" am: 76efbb30f5 am: 5f046cb614
am: 7bbdfcd8eb

Change-Id: I96c39ca1899768d039a108426fb04655aaf8d55f
2017-05-31 04:10:03 +00:00
Hugo Benichi
5f046cb614 Merge "ConnectivityServiceTest: more tweaks to testRequestBenchmark"
am: 76efbb30f5

Change-Id: I2c7e714af44c31a101fd58be6ebcc540fffd65a1
2017-05-31 03:52:05 +00:00
Hugo Benichi
02f8f9c830 ConnectivityServiceTest: more tweaks to testRequestBenchmark
Recent continuous testing runs indicates that commit 849b81b7 did not
completely fixed the issue with testRequestBenchmark.

This patch changes the name of the test to not include "test" and
removes @SmallTest annotation, which should do the job of @Ignore while
ConnectivityServiceTest still extends AndroidTestCase.

In addition timeouts are adjusted to take into account recent failures
observed.

This is the last pending action before turning on FrameworksNetTests on
presubmits.

Bug: 32561414
Test: no functional change
Change-Id: I56ef334e19e99e5a3483418330e5f0ccd6eb31bb
2017-05-31 10:23:42 +09:00
Erik Kline
3f5f551042 Merge "Minor improvement in logging in TetheringConfiguration" am: 39ce589f0b am: 8211c36db9
am: 1315903420

Change-Id: I77b4db07f2a43a576146537ae2ab72d2d0ebdde6
2017-05-28 11:31:32 +00:00
Erik Kline
8211c36db9 Merge "Minor improvement in logging in TetheringConfiguration"
am: 39ce589f0b

Change-Id: I1d61308cf21f3c4ebcc37f78bdd102f96a676462
2017-05-28 11:16:32 +00:00
Erik Kline
6bd7453206 Minor improvement in logging in TetheringConfiguration
Test: as follows
    - built
    - booted
    - flashed
    - runtest frameworks-net passes
    - dumpsys connectivity shows expected output
Bug: 32163131
Bug: 36504926
Bug: 36988090
Bug: 38152109
Bug: 38186915
Bug: 38218697
Change-Id: I4a2129d780dfec7bca693486a100ea3c78465430
2017-05-28 18:05:23 +09:00
Erik Kline
aa75fc4ec9 Merge "Support registration of offload control callbacks." am: 7ee96625c2 am: 66cc06c2c7
am: 96c6d201f4

Change-Id: Ie3c4b0929ccf311b4f02fffe0908571cbbb7d772
2017-05-26 10:29:13 +00:00
Erik Kline
66cc06c2c7 Merge "Support registration of offload control callbacks."
am: 7ee96625c2

Change-Id: Ica4f51762b577e3868e87622df3963cd89daacae
2017-05-26 10:16:26 +00:00
Erik Kline
f4b6e34fc0 Support registration of offload control callbacks.
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Bug: 34361337
Change-Id: I054cdf6a277c77e4cbf5c81145446a9be1c5fe39
2017-05-26 16:47:04 +09:00
Hugo Benichi
6923028613 Merge changes If4deb106,Ib25d7658 am: 0388f0e47b am: 41a57af66a
am: ae278410f5

Change-Id: I4fa34b647e7b2408d4493cfb148ae7d8c24bd6e8
2017-05-26 00:58:27 +00:00
Hugo Benichi
41a57af66a Merge changes If4deb106,Ib25d7658
am: 0388f0e47b

Change-Id: Id10b2a80388aff2307cefd95ffb5f2b4df5fbdc3
2017-05-26 00:43:06 +00:00
Hugo Benichi
849b81b7ab @Ignore ConnectivityServiceTest#testRequestBenchmark
Ignore the last remaining test in ConnectivityServiceTest with spurious
failures. testRequestBenchmark has some intrinsic chances of failure due
to the fact it attempts to assert elapsed time durations against a
reference target.

Bug: 32561414
Test: no functional change
Change-Id: Ib25d76581b47997b2ef84df3e6a9fd9224b85d92
2017-05-26 07:18:15 +09:00
Hugo Benichi
41687a201b Merge "NsdServiceInfo: move test to tests/net" am: 48859e01d5 am: 1b0f4bf606
am: e8c2700519

Change-Id: I44cae417fcddad72c13938b6fb751de6ed784046
2017-05-25 01:12:51 +00:00
Hugo Benichi
1b0f4bf606 Merge "NsdServiceInfo: move test to tests/net"
am: 48859e01d5

Change-Id: I3e864d744b956eff62512419018dd7cd5f692333
2017-05-25 01:01:15 +00:00
Hugo Benichi
48859e01d5 Merge "NsdServiceInfo: move test to tests/net" 2017-05-25 00:50:27 +00:00
Joel Scherpelz
5bb63befb8 Merge "Ignore flow label when comparing RAs in APF" am: 81fda77884 am: 6ccdb3fe19
am: ef0bd781b1

Change-Id: I53c2a493946ecc4e5617bcd3f5e64ff0b82fedf2
2017-05-25 00:18:44 +00:00
Joel Scherpelz
6ccdb3fe19 Merge "Ignore flow label when comparing RAs in APF"
am: 81fda77884

Change-Id: Id1a51e03e5065cabb4645d1e05f5e22ab4e98c0a
2017-05-25 00:04:12 +00:00
Joel Scherpelz
81fda77884 Merge "Ignore flow label when comparing RAs in APF" 2017-05-24 23:54:24 +00:00
Hugo Benichi
ea095c3e92 Merge "Move NsdServiceTest to correct directory" am: 0a76f99621 am: ca9fcb79f6
am: ecf4267889

Change-Id: Ib4e100fc8219b58ab7850407735a444dad3ec153
2017-05-24 07:15:09 +00:00
Hugo Benichi
e7514335bf 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
2017-05-24 16:03:43 +09:00
Hugo Benichi
ca9fcb79f6 Merge "Move NsdServiceTest to correct directory"
am: 0a76f99621

Change-Id: I37b614bec6dc4a9da55024c534dbfc9459e2764a
2017-05-24 06:59:02 +00:00
Treehugger Robot
0a76f99621 Merge "Move NsdServiceTest to correct directory" 2017-05-24 06:47:30 +00:00
Joel Scherpelz
967dec794b Ignore flow label when comparing RAs in APF
This change modifies the RA filter generation code to ignore bytes 1-3
of the IPv6 header. It also updates testApfFilterRa such that it fails
without the updates to ApfFilter.

Test: as follows
        - built
        - flashed
        - booted
        - sent RAs from OS X with differing flow labels and observed
	      that they were filtered
	- ApfTest passes
Bug: 31166495

(cherry picked from commit 7006bd4fe5eba4b6fad43dd28d9cad2d26ce140a)

Change-Id: I32153238193ac13a0e59be1875d983a0567c41c7
2017-05-24 15:24:24 +09:00
Hugo Benichi
523d466b91 Move NsdServiceTest to correct directory
Test: no functional change
Bug: 62044295
Change-Id: Iad3af646e8d252f84978d1a367878a78c2869982
2017-05-24 14:18:48 +09:00
Jayachandran C
0223c80846 Merge "Fix up upstream interface types for case DUN_UNSPECIFIED"
am: 485d103083

Change-Id: I8e7c513b206cbc5f19d582ec48e529ce067e2aa9
2017-05-24 02:01:12 +00:00
Jayachandran C
5805982027 Fix up upstream interface types for case DUN_UNSPECIFIED
The existing logic will add TYPE_MOBILE and TYPE_MOBILE_HIPRI
even if the carrier config has TYPE_DUN for DUN_UNSPECIFIED.

A check is added not to modify the upstream interface types
if there is already a cellular interface type. Add TYPE_MOBILE
and TYPE_MOBILE_HIPRI if there is no cellular types found.

Test: Hotspot on Verizon and T-Mobile US.
      Verified the requestNetwork has the DUN capability.

Bug: 38186915
Change-Id: I74fc5c791fee2885bf66df8975e92c2b48f1668c
2017-05-23 14:02:46 -07:00
Jayachandran Chinnakkannu
128898d7e1 Merge "Fix up upstream interface types for case DUN_UNSPECIFIED" into oc-dev
am: be67aefca2

Change-Id: Ibfee591728c5cf01d8e11b7ccf2418194d398b59
2017-05-23 20:51:30 +00:00
Hugo Benichi
ef55f6c6cf Merge "Fix NetworkStatsObserversTest" am: 0dc35fa969 am: 25282c3e38
am: 814351c843

Change-Id: Ice4bb8de4267cba7a15a60838e165fab5ebade72
2017-05-23 14:18:30 +00:00
Hugo Benichi
25282c3e38 Merge "Fix NetworkStatsObserversTest"
am: 0dc35fa969

Change-Id: I9b4e83b4e437089ea500d82990e59558ff55e02a
2017-05-23 11:37:37 +00:00
Hugo Benichi
e6f44606ef Merge "Fix NetworkStatsAccessTest" am: ec1f25a4ba am: cdb75d321b
am: 85afabc4ec

Change-Id: I60f9d8867655a6aa24ee192c772d4c26a96c9bcd
2017-05-23 07:02:54 +00:00
Hugo Benichi
cdb75d321b Merge "Fix NetworkStatsAccessTest"
am: ec1f25a4ba

Change-Id: If949493d9967fa723667947979262bf4f90841c2
2017-05-23 06:51:15 +00:00
Hugo Benichi
4076528b69 Merge "ConnectivityServiceTest: fix flakyness" am: a82cac1452 am: 004f36d5bc
am: eb9d0f16aa

Change-Id: Ic792060aafb5aa8b485054be18c3dba82bb15a3b
2017-05-23 04:56:41 +00:00
Hugo Benichi
004f36d5bc Merge "ConnectivityServiceTest: fix flakyness"
am: a82cac1452

Change-Id: I241192b2d9565c41f47bbe6227b50049898da679
2017-05-23 04:42:40 +00:00
Hugo Benichi
1cebba7173 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
2017-05-23 10:18:41 +09:00