Commit Graph

4788 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
e3a59ef575 [automerger skipped] Merge "Use Q permission on Q for startCaptivePortalApp" into rvc-dev am: b407f77bd0 -s ours
am skip reason: Change-Id I24b6907d164aba07df0f5a1a3715669e99cddd88 with SHA-1 aa660b56cf is in history

Change-Id: I46ba7e75687fa8dcaf6892c3014e9c478388d99d
2020-05-26 02:12:24 +00:00
Remi NGUYEN VAN
7a4db12ffe [automerger skipped] Merge "Skip testTemporarilyNotMeteredCapability on Q" into rvc-dev am: 6b23e3b0e3 -s ours
am skip reason: Change-Id I94e874e37cadadd90397278bf519db68db48a50f with SHA-1 6dfe6412a2 is in history

Change-Id: I228bee83996468bd8a66177a4da2da8a7c801c25
2020-05-26 02:11:50 +00:00
Remi NGUYEN VAN
6c67c21ee8 [automerger skipped] Fix and deflake ConnectivityManagerTest am: 8c91b0feaf -s ours
am skip reason: Change-Id I7459753b1068e1760a95337760db58d1df213fad with SHA-1 2f5879f6c7 is in history

Change-Id: I5ed932453d08d05eed232c6303ef0cae2c703610
2020-05-26 02:11:36 +00:00
Remi NGUYEN VAN
b407f77bd0 Merge "Use Q permission on Q for startCaptivePortalApp" into rvc-dev 2020-05-26 02:00:19 +00:00
Remi NGUYEN VAN
6b23e3b0e3 Merge "Skip testTemporarilyNotMeteredCapability on Q" into rvc-dev 2020-05-26 02:00:05 +00:00
Remi NGUYEN VAN
d79613570d Skip testTemporarilyNotMeteredCapability on Q
The capability did not exist on Q.

Bug: 155993662
Test: atest NetworkRequestTest
Original-Change: https://android-review.googlesource.com/1316082
Merged-In: I94e874e37cadadd90397278bf519db68db48a50f
Change-Id: I94e874e37cadadd90397278bf519db68db48a50f
2020-05-26 00:51:56 +00:00
Remi NGUYEN VAN
e878df691e Use Q permission on Q for startCaptivePortalApp
on Q startCaptivePortalApp was guarded by CONNECTIVITY_INTERNAL instead
of NETWORK_SETTINGS: change the permission adopted by shell on Q to
match the platform.

Test: atest CaptivePortalTest on a Q device
Bug: 150904735

Original-Change: https://android-review.googlesource.com/1316081
Merged-In: I24b6907d164aba07df0f5a1a3715669e99cddd88
Change-Id: I24b6907d164aba07df0f5a1a3715669e99cddd88
2020-05-26 00:51:39 +00:00
Remi NGUYEN VAN
8c91b0feaf Fix and deflake ConnectivityManagerTest
- Migrate the test to JUnit4, as JUnit3 cannot use assumeTrue
 - Skip IPv4 keepalive tests on networks that do not have native IPv4.
 - Refactor usage of adoptShellPermissionIdentity to use try / finally
   or runAsShellPermissionIdentity: test failures could lead to
   permission failures in other tests due to mismatched adopt/drop.
 - Fix ensureWifiConnected to support the "wifi enabled but not fully
   connected" case.

Bug: 150949391
Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest \
      --rerun-until-failure 50
Original-Change: https://android-review.googlesource.com/1310419
Merged-In: I7459753b1068e1760a95337760db58d1df213fad
Change-Id: I7459753b1068e1760a95337760db58d1df213fad
2020-05-26 00:48:51 +00:00
Remi NGUYEN VAN
6287cf1e3f Merge "Skip testTemporarilyNotMeteredCapability on Q" am: 352a01edfd am: 850cd533e0
Change-Id: Id5558ca121fc83510486e4ce80a68541dabf5bdf
2020-05-26 00:41:04 +00:00
Remi NGUYEN VAN
2c249c861b Merge "Use Q permission on Q for startCaptivePortalApp" am: efcc79f2a5 am: 3742699f21
Change-Id: Ie70dfd728b48fd8b4bd169a77140e46fe9ca25b6
2020-05-26 00:40:42 +00:00
Remi NGUYEN VAN
fff4665e6a Merge "Fix and deflake ConnectivityManagerTest" am: 591263914c am: 1d4d950451
Change-Id: I0b1dd2ad17b3c6460187d7e029ad787a7ba57824
2020-05-26 00:40:14 +00:00
Remi NGUYEN VAN
850cd533e0 Merge "Skip testTemporarilyNotMeteredCapability on Q" am: 352a01edfd
Change-Id: Id2fe42bb26d215fe2b0cf23b38927f26dc92d2cd
2020-05-26 00:27:10 +00:00
Remi NGUYEN VAN
3742699f21 Merge "Use Q permission on Q for startCaptivePortalApp" am: efcc79f2a5
Change-Id: I7985ae613e89e7376555c3ba3d53d075ffc71596
2020-05-26 00:26:35 +00:00
Remi NGUYEN VAN
1d4d950451 Merge "Fix and deflake ConnectivityManagerTest" am: 591263914c
Change-Id: I8caf45c73d7fb9a44251d0403734c675064e0335
2020-05-26 00:25:56 +00:00
Remi NGUYEN VAN
352a01edfd Merge "Skip testTemporarilyNotMeteredCapability on Q" 2020-05-26 00:00:45 +00:00
Remi NGUYEN VAN
efcc79f2a5 Merge "Use Q permission on Q for startCaptivePortalApp" 2020-05-26 00:00:17 +00:00
Remi NGUYEN VAN
591263914c Merge "Fix and deflake ConnectivityManagerTest" 2020-05-25 23:59:11 +00:00
Remi NGUYEN VAN
6dfe6412a2 Skip testTemporarilyNotMeteredCapability on Q
The capability did not exist on Q.

Bug: 155993662
Test: atest NetworkRequestTest
Change-Id: I94e874e37cadadd90397278bf519db68db48a50f
2020-05-25 19:21:21 +09:00
Remi NGUYEN VAN
aa660b56cf Use Q permission on Q for startCaptivePortalApp
on Q startCaptivePortalApp was guarded by CONNECTIVITY_INTERNAL instead
of NETWORK_SETTINGS: change the permission adopted by shell on Q to
match the platform.

Test: atest CaptivePortalTest on a Q device
Bug: 150904735

Change-Id: I24b6907d164aba07df0f5a1a3715669e99cddd88
2020-05-25 19:15:53 +09:00
Remi NGUYEN VAN
2f5879f6c7 Fix and deflake ConnectivityManagerTest
- Migrate the test to JUnit4, as JUnit3 cannot use assumeTrue
 - Skip IPv4 keepalive tests on networks that do not have native IPv4.
 - Refactor usage of adoptShellPermissionIdentity to use try / finally
   or runAsShellPermissionIdentity: test failures could lead to
   permission failures in other tests due to mismatched adopt/drop.
 - Fix ensureWifiConnected to support the "wifi enabled but not fully
   connected" case.

Bug: 150949391
Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest \
      --rerun-until-failure 50
Change-Id: I7459753b1068e1760a95337760db58d1df213fad
2020-05-25 19:15:39 +09:00
Remi NGUYEN VAN
deb1fca4e5 [automerger skipped] Merge "Add a cts test for PermissionMonitor security problem" am: c7cd60d9d4 am: b1e20af9bc -s ours
am skip reason: Change-Id I2c717a11bda43db166a55d343eb752ab45947fe8 with SHA-1 5a86f4b18a is in history

Change-Id: I542d55feeb19d951df96a65c804a46a66aaab1cc
2020-05-25 09:54:15 +00:00
Remi NGUYEN VAN
b1e20af9bc Merge "Add a cts test for PermissionMonitor security problem" am: c7cd60d9d4
Change-Id: I69979d9fdb77e8066f90cc2d88ff655fcd5f8b85
2020-05-25 09:32:32 +00:00
Remi NGUYEN VAN
c7cd60d9d4 Merge "Add a cts test for PermissionMonitor security problem" 2020-05-25 09:21:39 +00:00
paulhu
b568c3baa6 Add a cts test for PermissionMonitor security problem am: 5a86f4b18a
Change-Id: Iad7a6bc06d8d10787c70b99ccb559e9075d5917a
2020-05-25 08:13:18 +00:00
paulhu
5a86f4b18a Add a cts test for PermissionMonitor security problem
Add a cts test to check whether app can have netd sytem
permission even the app didn't grant the
CONNECTIVITY_USE_RESTRICTED_NETWORKS permission.

Bug: 144679405
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: I2c717a11bda43db166a55d343eb752ab45947fe8
Merged-In: I2c717a11bda43db166a55d343eb752ab45947fe8
(cherry picked from commit 1bc6b39789, ag/10285567)
2020-05-25 05:43:18 +00:00
Luke Huang
f45270dab9 Merge "Deflaky test for DnsResolverTest" am: 76fdd5976f am: 39edee84c8
Change-Id: I7fb9cab2b8ff2e2b42de94a3e7f9d3a4d0389b2f
2020-05-22 16:00:08 +00:00
Luke Huang
39edee84c8 Merge "Deflaky test for DnsResolverTest" am: 76fdd5976f
Change-Id: Id693a9bbeb3533515ccb8f3920e5e2602c5c841a
2020-05-22 15:47:28 +00:00
Luke Huang
76fdd5976f Merge "Deflaky test for DnsResolverTest" 2020-05-22 15:28:05 +00:00
Yan Yan
dee6ff4e4b Merge "Cleanup of IkeSessionPskTest" am: 27349420bd am: 762d3c0be1
Change-Id: Idf907ac333dc9c00077dfb92e82f9a578cb8aee2
2020-05-22 02:18:14 +00:00
Yan Yan
762d3c0be1 Merge "Cleanup of IkeSessionPskTest" am: 27349420bd
Change-Id: Ida17fac36eb6fcfe088c4e4a5c425ca305e78a14
2020-05-22 02:03:27 +00:00
Yan Yan
27349420bd Merge "Cleanup of IkeSessionPskTest" 2020-05-22 01:49:08 +00:00
Yan Yan
ad21ee4800 Merge "Exit test if device does not support IPsec tunnel" am: 32d03b84b6 am: 3a264ff900
Change-Id: Ic18d851039d7aae231845a9b3b5e0373caf8683f
2020-05-21 23:35:00 +00:00
Yan Yan
3a264ff900 Merge "Exit test if device does not support IPsec tunnel" am: 32d03b84b6
Change-Id: I7c2e36102ec1020a74d323d098484cf035b50340
2020-05-21 23:23:34 +00:00
evitayan
34e71a5b68 Cleanup of IkeSessionPskTest
- Add java doc in IkeSessionTestBase about the necessity to use
  different addresses and Networks in each test
- Use ArrayTrackRecord in Test Session Callback to retrieve the
  latest result.
- Verify that IpSecTransform pair is created and deleted

Bug: 148689509
Test: atest CtsIkeTestCases
Change-Id: Ib747c8cdfe1827e8df2aa7544e28e98a177d3d1c
2020-05-21 16:23:02 -07:00
Yan Yan
32d03b84b6 Merge "Exit test if device does not support IPsec tunnel" 2020-05-21 23:10:54 +00:00
Luke Huang
d6e36d820e Deflaky test for DnsResolverTest
It's possible that private DNS setting is not in the state we expected
when we tried to enable strict mode during tests. The problem here is
that there are 2 setting Uris(mode and specifier) relating to strict
mode, each of them might trigger private DNS setting changing evnet in
ConnectivityService.
Previously, we tried to enable strict mode with first set private DNS
mode and then private DNS specifier. This may result in 2 consecutive
private DNS changes events with very short intervals, which caused
conflicts between DnsResolver / NetworkMonitor and lead to flaky tests.

So
0. Use opportunistic as default mode if no default mode existed.
1. Change the order (mode and specifier) for enabling strict mode.
2. Change private DNS mode only when needed.
     (If original mode is "hostname", then we only need to set
     specifier)

Bug: 153624005
Bug: 151122313
Bug: 150952393
Test: atest DnsResolverTest --rerun-until-failure 100
Test: forrest (git_master, cts/networking/gce-all)
Test: forrest (git_rvc-dev, atest CtsNetTestCases)
Test: forrest (git_rvc-dev, mts/dnsresolver/device-all)
Change-Id: I224a6493c87cebaf0bf954c2644e2945ccd50db1
2020-05-21 16:04:49 +08:00
TreeHugger Robot
a9e81620ff Merge "Create NetworkAgent CTS for NET_CAP_TEMP_NOT_METERED" into rvc-dev am: ed6b680e0c
Change-Id: I4e144146796c3281680532a54f714d5340f76e36
2020-05-21 05:40:08 +00:00
TreeHugger Robot
ed6b680e0c Merge "Create NetworkAgent CTS for NET_CAP_TEMP_NOT_METERED" into rvc-dev 2020-05-21 05:30:50 +00:00
Sarah Chin
f773b852ad [automerger skipped] Merge "Add cts for TEMPORARILY_NOT_METERED" am: bab248804b am: 4777f25a6e -s ours
am skip reason: Change-Id I6838dff70e6608f166119b99750db3bc59c59e42 with SHA-1 0a0d71f1ec is in history

Change-Id: I077cfb0ba6fb367e67fd42deca650a2a71235f2d
2020-05-21 02:05:34 +00:00
Sarah Chin
8e28d8789d Create NetworkAgent CTS for NET_CAP_TEMP_NOT_METERED
Test: atest NetworkAgentTest
Bug: 155993662
Change-Id: Ic968bf37075c23e9ea7d98eaec7f4f37d9ebc337
2020-05-20 18:58:21 -07:00
Sarah Chin
4777f25a6e Merge "Add cts for TEMPORARILY_NOT_METERED" am: bab248804b
Change-Id: Ie40c6ec697f646f5dda84b681af3929fdfff8683
2020-05-21 01:53:47 +00:00
Sarah Chin
bab248804b Merge "Add cts for TEMPORARILY_NOT_METERED" 2020-05-21 01:37:51 +00:00
Sarah Chin
5a0794bdef Merge "Add cts for TEMPORARILY_NOT_METERED" into rvc-dev am: bf6738e4f3
Change-Id: Ia0b154f22d094a7d2580bc29472a068389f20f4c
2020-05-21 00:35:22 +00:00
Sarah Chin
ae36797b69 Add cts for TEMPORARILY_NOT_METERED
Bug: 155993662
Test: atest NetworkRequestTest
Change-Id: I6838dff70e6608f166119b99750db3bc59c59e42
Merged-In: I6838dff70e6608f166119b99750db3bc59c59e42
2020-05-20 17:27:55 -07:00
evitayan
677a1c1554 Exit test if device does not support IPsec tunnel
Bug: 155926216
Test: CtsIkeTestCases
Change-Id: I4e426b8f3509e56e7e2e7532e216533ad8bfbc2f
2020-05-20 15:18:32 -07:00
Sarah Chin
0a0d71f1ec Add cts for TEMPORARILY_NOT_METERED
Bug: 155993662
Test: atest NetworkRequestTest
Change-Id: I6838dff70e6608f166119b99750db3bc59c59e42
2020-05-20 15:03:38 -07:00
TreeHugger Robot
c7b7569e37 Merge "Apply MainlineTestModuleController to tethering cts tests" into rvc-dev am: eded3fd9be
Change-Id: I6a6e160507fe4c40bef9d28073c928af3317e3fa
2020-05-19 19:46:31 +00:00
TreeHugger Robot
eded3fd9be Merge "Apply MainlineTestModuleController to tethering cts tests" into rvc-dev 2020-05-19 19:32:00 +00:00
Chen Zhu
f021c464fd Apply MainlineTestModuleController to tethering cts tests
to only run them when com.google.android.tethering is

installed on device. This does not change any existing CTS run.

The logic only applies when the test triggered by mts-tradefed

to make sure it runs appropriate set of tests against the device.

For example, the test will be skipped when running MTS on Q because

tethering and wifi are not on Q devices.

Bug: 154845935
Test: m mts && mts-tradefed run mts-tethering
Change-Id: I9e6bd60982d4ef67538ad506e7008366bbf35363
2020-05-19 18:04:33 +00:00
Ken Chen
c6a0bc670c [automerger skipped] Merge "Fix CtsNetTestCasesLatestSdk fail on Q platform" into rvc-dev am: 37a3c0dec2 -s ours
am skip reason: Change-Id I5db3cb28829847e74412d270db7d17b81c5e26a2 with SHA-1 5dd02e3103 is in history

Change-Id: I84e51f20f2b1d4161e70d1479266a8890501e9cc
2020-05-19 15:45:10 +00:00