Commit Graph

6675 Commits

Author SHA1 Message Date
Richard Uhler
17b89c58a8 Merge "Add watchdog triggered staged rollback test" into qt-dev
am: 7364b0e889

Change-Id: I99894d979515c1c9df634c894082a8e3069aa1b6
2019-05-17 23:04:48 -07:00
TreeHugger Robot
7364b0e889 Merge "Add watchdog triggered staged rollback test" into qt-dev 2019-05-18 05:44:20 +00:00
Richard Uhler
bf1bf9607d Add watchdog triggered staged rollback test
Test: atest StagedRollbackTest
Bug: 132758573
Bug: 132866890
Change-Id: I80e4ebf3659702992f32504690ea5ec4bab88534
2019-05-17 14:38:34 +01:00
Paul Hu
f1a7433ae4 Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" into qt-dev 2019-05-17 06:46:36 +00:00
Xiao Ma
239e81596a Clean up the arguments annotation and verify items on IpMemoryStoreTest.
Bug: 131133347
Test: atest FrameworksNetTests

Merged-In: I8ce3bed435fbbb814d71fe48ffd305ff3f947f3f
Merged-In: I1db13a48b59d743482436ecf8a20d7f12edd6e1c
(cherry picked from commit 7567c4ac50)

Change-Id: I78024c0e25d812639d1236faa59d383742ae2141
2019-05-15 14:53:42 +00:00
Paul Hu
c82a096708 Ignore NetworkTest when running CtsNetTestCases in instant app mode
Ignore NetworkTest#testBindSocketOfConnectedDatagramSocketThrows
when running CtsNetTestCases in instant app mode due to sockect
cannot bind in instant app mode.

Bug: 123366918
Test: atest CtsNetTestCases --instant
Test: atest FrameworksNetTests

Change-Id: I1e93d4491e3d9e5a095ff4b6169b2f70e7b3b690
Merged-In: Ia28eea113e19b9c44998677e5b8093be178a06a3
Merged-In: I1e93d4491e3d9e5a095ff4b6169b2f70e7b3b690
(cherry picked from commit 73c0d48b14)
2019-05-15 06:58:27 +00:00
Paul Hu
273f61880e Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" am: 910b72f109
am: f672e96b87

Change-Id: Ia28eea113e19b9c44998677e5b8093be178a06a3
2019-05-14 21:35:43 -07:00
Paul Hu
f672e96b87 Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode"
am: 910b72f109

Change-Id: I670b9847a2e3b3b794ee4694a0838440cabdc39f
2019-05-14 21:17:33 -07:00
Paul Hu
910b72f109 Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" 2019-05-15 03:42:32 +00:00
Chenbo Feng
66404a1224 Clean up the permission control code in framework
Delete the unused NetworkManagementService API for set/remove
permissions. Use PERMISSION_NONE to replace NO_PERMISSIONS so the
framework now use the same set of permission constant when communicate
with netd.

Bug: 128944261
Test: PermissionMonitorTest.java

Change-Id: I25224c9576f52d2a0a0bd2182325c7aac7b28eb5
Merged-In: I25224c9576f52d2a0a0bd2182325c7aac7b28eb5
(cherry picked from commit 05887f99c6)
2019-05-13 14:22:58 -07:00
Chenbo Feng
b9e294616c Merge "Clean up the permission control code in framework" am: 78d6a42e99
am: a4cbe3d728

Change-Id: I1af059171c5d80be7abaee636f012f3b55dac2df
2019-05-13 11:32:59 -07:00
Chenbo Feng
a4cbe3d728 Merge "Clean up the permission control code in framework"
am: 78d6a42e99

Change-Id: Iff2316f72df4cff56829b281882dc920d63937bd
2019-05-13 11:20:31 -07:00
Treehugger Robot
78d6a42e99 Merge "Clean up the permission control code in framework" 2019-05-13 18:04:50 +00:00
Junyu Lai
fd850fd3eb Release keepalive slot after stopped
Currntly, keepalive slot is released when stop() is called. Next
starting keepalive can use the same slot number while previous
keepalive is still stopping. When the previous keepalive is
stopped, the incoming as will be processed by the new keepalive.

This change release keepalive slot after the result of stopping
has returned. Thus, newly created keepalive cannot allocate the
same slot number while lower layer is still processing stop event.

This change also disable flaky assertions that are caused by
test port has been occupied by other process.

Bug: 129512753
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 100
      2. atest FrameworksNetTests --generate-new-metrics 10
      3. simulate the fail case manually.

Change-Id: I790f6bbc5efc3f088034ac45ec379da5f781d0ca
Merged-In: I1991627545519ee5cb408a3df3a006f710f4af7b
(cherry picked from commit 3523a3d02a)
2019-05-13 18:42:19 +08:00
junyulai
2ee367ece9 Support customization of supported keepalive count per transport
This change specifies the required minimum supported keepalives
in SDK, and allows OEMs to customize supported keepalive count
per network through resource overlay.

Bug: 129371366
Test: 1. m -j doc-comment-check-docs
      2. atest FrameworksNetTests

Clean cherry-pick of aosp/946359

Change-Id: I06840834d0ee8121358bf4829fe47ecf9964d395
Merged-In: I0218f3674628c13ead63fc9a873895ba7f113033
Merged-In: Ia667386c1a8949839871a6949d79552d9c8b88f0
2019-05-13 15:52:07 +09:00
TreeHugger Robot
ac3b5006c2 Merge "Add CTS API coverage for APIs which are used by NetworkStack" into qt-dev 2019-05-13 02:41:34 +00:00
TreeHugger Robot
8ae98e91a1 Merge "Add ApfCapabilities common test cases" into qt-dev 2019-05-13 02:28:03 +00:00
Paul Hu
85050babe4 Add ApfCapabilities common test cases
Bug: 129199900
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass

Change-Id: I737ab11ccd1bf6f92bae4eae21e67d4d6f86a758
Merged-In: Icfd80943212430b2a0e6a4b55f53270cbc3d1693
Merged-In: I737ab11ccd1bf6f92bae4eae21e67d4d6f86a758
(cherry picked from commit ce54fa5cb3)
2019-05-13 01:19:00 +00:00
Paul Hu
a2d5195af8 Add LinkProperties common test cases
Bug: 129198747
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass

Change-Id: I03d162ea3c5bc2ccb8f913bbfdf85ebcd194c35a
Merged-In: I8d36177cbf4f39da602331e091a60a40f6eaea33
Merged-In: I03d162ea3c5bc2ccb8f913bbfdf85ebcd194c35a
(cherry picked from commit 385757291c)
2019-05-13 01:17:06 +00:00
Paul Hu
ce087d0f6e Merge "Add ApfCapabilities common test cases" am: ce5ecd9304
am: b7ed49dc0e

Change-Id: Icfd80943212430b2a0e6a4b55f53270cbc3d1693
2019-05-12 10:26:45 -07:00
Paul Hu
b7ed49dc0e Merge "Add ApfCapabilities common test cases"
am: ce5ecd9304

Change-Id: Iafcc1bad3e4d5a6bd574231ccf79b0e775617ae2
2019-05-12 10:15:31 -07:00
Paul Hu
ce5ecd9304 Merge "Add ApfCapabilities common test cases" 2019-05-12 16:57:18 +00:00
Ian Kasprzak
8ca8121a3c Reland: Add FrameworksNetTests dependency on libcgrouprc
Bug: 132435820
Bug: 132437254

Original CL description:
Add FrameworksNetTests dependency on libcgrouprc

The tests are currently broken without this dependency.

Bug: 129902619
Test: atest FrameworksNetTests
Merged-In: I85891485157ed86e069039dfe3092028ff703dd5
Change-Id: I7daf6bdf8a9f8836d17746e1e352f8f75cd34adc
2019-05-10 12:08:44 -07:00
Xiao Ma
a23bbba198 Merge "Clean up the arguments annotation and verify items on IpMemoryStoreTest." am: 2df17040e5
am: c14d65cc68

Change-Id: I1db13a48b59d743482436ecf8a20d7f12edd6e1c
2019-05-10 08:45:30 -07:00
Xiao Ma
2df17040e5 Merge "Clean up the arguments annotation and verify items on IpMemoryStoreTest." 2019-05-10 15:16:33 +00:00
Chalard Jean
f98611062c Support strict mode private DNS on VPNs that provide Internet.
Currently, strict mode private DNS does not work on VPNs because
NetworkMonitor does not validate VPNs. When a VPN connects, it
immediately transitions to ValidatedState, skipping private DNS
hostname resolution.

This change makes NetworkMonitor perform private DNS hostname
resolution and evaluation even on VPNs.

In order to ensure that the system always immediately switches to
the VPN as soon as it connects, remove the unvalidated penalty
for VPN networks. This ensures that the VPN score is always 101
and the VPN always outscores other networks as soon as it
connects. Previously, it would only outscore other networks
when no-op validation completed.

Bug: 122652057
Test: atest FrameworksNetTests NetworkStackTests
Test: manually ran a VPN with private DNS in strict mode
atest android.net.cts.ConnectivityManagerTest com.android.cts.net.HostsideVpnTests
Change-Id: Iaa78a7edcf23755c89d7b354edbc28d37d74d891
Merged-In: Iaa78a7edcf23755c89d7b354edbc28d37d74d891
(cherry picked from commit 414b8c8b1c)
2019-05-10 13:09:00 +00:00
Shafik Nassar
d4e1307573 Merge "Fail to enable rollback if enable rollback times out" into qt-dev
am: b273078adf

Change-Id: I70d3646dcef80e0bc9ba1034a3103808f1079d99
2019-05-10 05:16:19 -07:00
Chalard Jean
414b8c8b1c Merge "Support strict mode private DNS on VPNs that provide Internet." am: a56eab41a6
am: 549439cc92

Change-Id: I28cc679def7cdd4dc5187e65f4524c3998ebcafc
2019-05-10 04:33:43 -07:00
Shafik Nassar
b273078adf Merge "Fail to enable rollback if enable rollback times out" into qt-dev 2019-05-10 10:23:53 +00:00
Chalard Jean
a56eab41a6 Merge "Support strict mode private DNS on VPNs that provide Internet." 2019-05-10 09:39:17 +00:00
Paul Hu
6084f24b09 Merge "Add LinkProperties common test cases" am: e62f6c29e4
am: 9fcf3a1d76

Change-Id: I8d36177cbf4f39da602331e091a60a40f6eaea33
2019-05-10 02:20:04 -07:00
Junyu Lai
193254c6a5 Merge changes Ibcb91105,I0218f367 am: 7db54229f5
am: 94522117bd

Change-Id: Ia667386c1a8949839871a6949d79552d9c8b88f0
2019-05-10 02:13:34 -07:00
paulhu
f78e6c89ac Add ApfCapabilities common test cases
Bug: 129199900
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I0c2aeaa1451e1f07edb0d0f8529e42e6fa107a6d
2019-05-10 16:03:42 +08:00
Xiao Ma
66a3073107 Clean up the arguments annotation and verify items on IpMemoryStoreTest.
Bug: 131133347
Test: atest FrameworksNetTests
Change-Id: I371e7b637ab1c2671f0378508b06adff174f024d
2019-05-10 15:42:33 +09:00
Junyu Lai
a33165110a Merge changes Ibff278a6,If6d537a3 am: ecc6fad658
am: a865058628

Change-Id: Ic51f3b32375378ff74bdd54d1f36569b277fc80f
2019-05-09 23:30:19 -07:00
Paul Hu
e62f6c29e4 Merge "Add LinkProperties common test cases" 2019-05-10 05:55:11 +00:00
Junyu Lai
7db54229f5 Merge changes Ibcb91105,I0218f367
* changes:
  Limit unprivileged keepalives per uid
  Support customization of supported keepalive count per transport
2019-05-10 05:47:23 +00:00
Lorenzo Colitti
80986d9a53 Support strict mode private DNS on VPNs that provide Internet.
Currently, strict mode private DNS does not work on VPNs because
NetworkMonitor does not validate VPNs. When a VPN connects, it
immediately transitions to ValidatedState, skipping private DNS
hostname resolution.

This change makes NetworkMonitor perform private DNS hostname
resolution and evaluation even on VPNs.

In order to ensure that the system always immediately switches to
the VPN as soon as it connects, remove the unvalidated penalty
for VPN networks. This ensures that the VPN score is always 101
and the VPN always outscores other networks as soon as it
connects. Previously, it would only outscore other networks
when no-op validation completed.

Bug: 122652057
Test: atest FrameworksNetTests NetworkStackTests
Test: manually ran a VPN with private DNS in strict mode
atest android.net.cts.ConnectivityManagerTest com.android.cts.net.HostsideVpnTests
Change-Id: Iaa78a7edcf23755c89d7b354edbc28d37d74d891
2019-05-10 14:30:54 +09:00
Treehugger Robot
ecc6fad658 Merge changes Ibff278a6,If6d537a3
* changes:
  Revert "Add NATT keepalive resources and methods into IpSecService"
  Revert "[KA11] Verify fd ownership and allocate resource for NattKeepalive"
2019-05-10 01:42:26 +00:00
Xiao Ma
3ce093b527 adopt non-blocking method to obtain the IpMemoryStore service.
Bug: 131133347
Test: atest FrameworksNetTests
Merged-In: I7de4f23370bdf9c9df5e74ed074c794080d93d95
Merged-In: If0d43f21710ca31149610d3e6a5f0d7e4acc11a2

Change-Id: If0d43f21710ca31149610d3e6a5f0d7e4acc11a2
(cherry picked from commit c4e4fd7bee)
2019-05-10 00:55:14 +00:00
Xin Li
5bc12066ca Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:45 +00:00
Junyu Lai
4e645f30a9 Revert "Add NATT keepalive resources and methods into IpSecService"
This reverts commit 2445227fa8.

Reason for revert: Adds dependency between IpSecService and
                   ConnectivityService may lead to future deadlock
		   problems. Uses a simpler approach instead,
		   hence the solution is not needed.
		   See aosp/954040.

Change-Id: Ibff278a6eee666cd85dba81c2bed94d568679b02
2019-05-10 00:58:18 +08:00
junyulai
a91094aeb6 Support customization of supported keepalive count per transport
This change specifies the required minimum supported keepalives
in SDK, and allows OEMs to customize supported keepalive count
per network through resource overlay.

Bug: 129371366
Test: 1. m -j doc-comment-check-docs
      2. atest FrameworksNetTests

Change-Id: I0218f3674628c13ead63fc9a873895ba7f113033
2019-05-10 00:36:58 +08:00
Xiao Ma
c4e4fd7bee Merge "adopt non-blocking method to obtain the IpMemoryStore service." am: b340a6988b
am: c657a844ea

Change-Id: If0d43f21710ca31149610d3e6a5f0d7e4acc11a2
2019-05-09 04:55:13 -07:00
Xiao Ma
c657a844ea Merge "adopt non-blocking method to obtain the IpMemoryStore service."
am: b340a6988b

Change-Id: Idd6110141795f86dcf28eafab87683eda4c70b93
2019-05-09 04:43:33 -07:00
shafik
4831ad7039 Fail to enable rollback if enable rollback times out
Make PackageManager send a ACTION_CANCEL_ENABLE_ROLLBACK intent to
RollbackManager. RollbackManager marks the relevant rollback as invalid.
Allow enable rollback to continue as usual, before making the rollback
available, RollbackManager checks whether it's valid. If it's not, the
rollback data is deleted.

Add a test case for expired rollback enabling attempt in RollbackTest.

Test: atest RollbackTest#testEnableRollbackTimeoutFailsRollback
Test: manual -
      * Set ENABLE_ROLLBACK_TIMEOUT_MILLIS to 1 ms using DeviceConfig
      * Install a mainline module with rollback enabled
      * adb shell dumpsys rollback
      * observe that no rollback was made available
Fixes: 131679409

Change-Id: Iaa4dbff002b820aff1fc3e1b985f129cf5ebe2e6
2019-05-09 12:38:04 +01:00
Xiao Ma
b340a6988b Merge "adopt non-blocking method to obtain the IpMemoryStore service." 2019-05-09 11:30:56 +00:00
Lorenzo Colitti
8961a1728b Merge "[CS] Unregister callback as part of onUnavailable dispatch" into qt-dev 2019-05-09 09:42:38 +00:00
paulhu
cc95b066a3 Add LinkProperties common test cases
Bug: 129198747
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I15b8dbd060c313d0f2be89fed4518c18b3196d38
2019-05-09 15:49:00 +08:00
Etan Cohen
06927ada84 Merge "[CS] Unregister callback as part of onUnavailable dispatch" am: 6b88a9192a
am: 7c49d9b39d

Change-Id: Ida684c441e7aaedce9a29da071ef5a68403d08b3
2019-05-08 22:42:55 -07:00