Commit Graph

4075 Commits

Author SHA1 Message Date
Sudheer Shanka
ac60acc8f9 Merge "Fix error message in RestrictBackgroundNetworkTest" am: e80f1b5e31
Change-Id: Id0b14b96632b497d874b9d59a21ddabfcb803c25
2020-05-01 01:09:32 +00:00
Dominic Lemire
cae5079d9d Fix error message in RestrictBackgroundNetworkTest
Fixed the error message when the expected number of broadcasts is exceeded.

Bug: 147139427

Change-Id: I7e69dca81abdb29a9eb7d110266edbe483e17a01
2020-04-30 05:47:29 +00:00
Remi NGUYEN VAN
7c7f4488ec Merge "Force reconnect in connectToWifi" am: 6c63b1eaac
Change-Id: I6de091b2c04cc84a03f4ecc7755e3ac6acbb14f5
2020-04-28 07:27:41 +00:00
Remi NGUYEN VAN
6c63b1eaac Merge "Force reconnect in connectToWifi" 2020-04-28 07:10:15 +00:00
Remi NGUYEN VAN
ed91cdc503 Merge "Add test for internet availability on portals" am: 412c8a9f53
Change-Id: I0873cb4cbaf2dccaddc381a07c975370a10410be
2020-04-28 06:05:01 +00:00
Remi NGUYEN VAN
412c8a9f53 Merge "Add test for internet availability on portals" 2020-04-28 05:49:08 +00:00
Remi NGUYEN VAN
71cfc79527 Force reconnect in connectToWifi
There is no guarantee that Wifi will automatically reconnect after
enabling, especially in cases where no internet access was detected on
the access point the last time it was connected.

Use WifiManager#reconnect to force wifi to reconnect to the access
point. The API is deprecated for general use, but system apps are
documented as exempted from the deprecation.

Bug: 152280218
Test: atest --rerun-until-failure 200 CtsNetTestCases:CaptivePortalTest
Change-Id: Ia7d83337ee0ffad9414031711cf7e937b14f968d
2020-04-27 22:47:12 +09:00
Remi NGUYEN VAN
ecb661016f Add test for internet availability on portals
Add a test verifying that when the device has detected a captive portal,
or when the user is trying to login to a captive portal, the captive
portal network does not become the default network if another network
can provide internet access.
This follows R CDD requirements.

Test: atest CtsNetTestCases:android.net.cts.CaptivePortalTest
Bug: 152280218
Change-Id: I6a97ed26dba665efdc67abb2371e0fc30ede020c
2020-04-27 22:47:10 +09:00
Yan Yan
78bfb718f2 Merge "Test configuring digital-signature-based auth" am: c910917fd2
Change-Id: I365610bc531a0bbb1f40aea9d6af7ca3f8486bd5
2020-04-27 02:44:06 +00:00
Yan Yan
c910917fd2 Merge "Test configuring digital-signature-based auth" 2020-04-27 02:34:46 +00:00
Yan Yan
8163d0ec62 Merge "Test building IkeSessionParams with EAP" am: 4f532038f1
Change-Id: Idebb767e4f975f975ce2299f4310fe25fc78a94a
2020-04-26 21:50:45 +00:00
Yan Yan
4f532038f1 Merge "Test building IkeSessionParams with EAP" 2020-04-26 21:29:31 +00:00
Yan Yan
250cd90ab6 Merge "Add test for IkeIdentification" am: 609d48cc11
Change-Id: I0e3921aee9e5f66375d15e89523647e52f4caf90
2020-04-25 02:08:41 +00:00
Yan Yan
8a6bf04733 Merge "Add initial CTS test for IkeSessionParams" am: f839aaad8c
Change-Id: Iaaa69b04d380b2ae3705e33472f7fb97b1a5cb24
2020-04-25 02:08:26 +00:00
evitayan
bba019dc40 Test configuring digital-signature-based auth
Bug: 148689509
Test: atest CtsIkeTestCases
Change-Id: Ieaceaadf116cb2885cbf22ae48579cec88268416
2020-04-24 19:01:24 -07:00
evitayan
e800e95037 Test building IkeSessionParams with EAP
Bug: 148689509
Test: atest CtsIkeTestCases
Change-Id: Iea7f4d14502f4b204c7a0d7357e1aaec99954e1f
2020-04-24 19:01:11 -07:00
Yan Yan
609d48cc11 Merge "Add test for IkeIdentification" 2020-04-25 01:56:17 +00:00
Yan Yan
f839aaad8c Merge "Add initial CTS test for IkeSessionParams" 2020-04-25 01:53:15 +00:00
evitayan
9dcef40023 Add test for IkeIdentification
Bug: 148689509
Test: atest CtsIkeTestCases
Change-Id: Ieda584446c37d121fc16a212e2c6c60b934b0f53
2020-04-24 18:16:18 +00:00
evitayan
b9438336c7 Add initial CTS test for IkeSessionParams
This commit adds tests for building IkeSessionParams with PSK. It
also tests configuring SA lifetimes, retransmissions and PCSCF
server requests

Bug: 148689509
Test: atest CtsIkeTestCases
Change-Id: I16fdc1ff9a22acb82b376211e0f187c4ead4cae5
2020-04-24 10:30:30 -07:00
Treehugger Robot
91d915e116 Merge "Add testTetheringUpstream cts test" am: 6aa8f074d0
Change-Id: Ib8ca2e9a3dca0494af62e193f261bf4a943d3028
2020-04-24 15:44:51 +00:00
Treehugger Robot
b8e44e87b3 Merge "Test legacy tether/untether API and onError callback" am: c31694df4c
Change-Id: If9a821510f0e1117faf3d12808753fd3e2535adf
2020-04-24 15:44:37 +00:00
Treehugger Robot
6aa8f074d0 Merge "Add testTetheringUpstream cts test" 2020-04-24 15:36:21 +00:00
Treehugger Robot
c31694df4c Merge "Test legacy tether/untether API and onError callback" 2020-04-24 15:29:44 +00:00
markchien
0420e692a7 Add testTetheringUpstream cts test
If cellular is the mobile network, tethering should select it as
upstream. If DUN is required, tethering should use DUN as its upstream.

Bug: 153614366
Bug: 150644305
Test: atest CtsTetheringTest

Change-Id: Ief9c745322e8705c0e50185e749a81c5a9d20743
2020-04-24 22:29:43 +08:00
markchien
1a54afc5b1 Test legacy tether/untether API and onError callback
Test legacy tether/untether API behavior. tether() rely on downstream
setup ready for tethering. Currently the only user is bluetooth
tethering. For other tetherings, there is no guaranteed that calling
tether() can always switch given interface to tethered. Tethering
may callback with onError depend on the interface status. Caller
should use startTethering/stopTethering API instead of these
legacy APIs.

This change also change the precondition verification of startTethering.
If tethering interface got error last time, such interface would not
be reported as tetherable.

Bug: 150632712
Test: atest CtsTetheringTest
Change-Id: Ifb3a0618208ffd0ff224c60f377036bc22ba0565
2020-04-24 21:16:06 +08:00
Sudheer Shanka
4cd0f56bea Merge changes I05285811,I782f8a06,I7c5bf823,I7bb2a7e4 into stage-aosp-master
* changes:
  Ensure location is enabled before getting SSID.
  Fix a regression in how required properties are collected.
  Fix Error Prone errors
  Reland "Pull service dumps to help debug test failures."
2020-04-24 03:14:17 +00:00
Yan Yan
b15c228d88 Merge "Add CTS for EapSessionConfig" am: c7afaba688
Change-Id: I51e89a5604d78c325a8a985b3144ae49734f9eb3
2020-04-24 00:25:31 +00:00
Yan Yan
c7afaba688 Merge "Add CTS for EapSessionConfig" 2020-04-24 00:00:43 +00:00
Yan Yan
a1c71f705b Merge "Create base class that sets up test network" am: c921e5075f
Change-Id: Ib5f5fd2bc54ad5c4866622f74f1c1d555fee5592
2020-04-23 22:37:28 +00:00
Yan Yan
755a4b59b7 Merge "Make a copy of TunUtils and PacketUtils" am: dbe2adf308
Change-Id: I8a268a878c089a98a1d9b73190ab0db6204b0746
2020-04-23 22:37:03 +00:00
Yan Yan
c921e5075f Merge "Create base class that sets up test network" 2020-04-23 22:19:21 +00:00
Yan Yan
dbe2adf308 Merge "Make a copy of TunUtils and PacketUtils" 2020-04-23 22:18:45 +00:00
Sudheer Shanka
d43f034725 Ensure location is enabled before getting SSID.
When location is disabled, Wi-Fi scan results and SSID are not available
to apps.

Fixes: 153850762
Fixes: 153396893
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I05285811d7131e116d5e1d072137ed2cf9576d05
Merged-In: I05285811d7131e116d5e1d072137ed2cf9576d05
2020-04-23 14:18:32 -07:00
Sudheer Shanka
004c442de9 Fix a regression in how required properties are collected.
+ Enable app standby mode before running the tests.

Fixes: 147459100
Fixes: 117169751
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: cts-tradefed run singleCommand cts-on-gsi --skip-device-info \
      --skip-preconditions -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I782f8a06922622d28f9a9d5c9f2afa2b12f8aa80
Merged-In: I782f8a06922622d28f9a9d5c9f2afa2b12f8aa80
2020-04-23 14:18:32 -07:00
Sudheer Shanka
a0e71e89ea Fix Error Prone errors
Soong wasn't including android_app or android_test sources in the
javac-check target used for the Error Prone build, which allowed
some Error Prone errors to get in.  Fix them so Error Prone can be
re-enabled for these targets.

Fixes:
cts/hostsidetests/net/app/src/com/android/cts/net/hostside/RequiredPropertiesRule.java:61: error: [CollectionIncompatibleType] Argument '~requiredProperty.getValue()' should not be passed to this method; its type int is not compatible with its collection's type argument Property

Bug: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I7c5bf823bf371902285ce3ee3929796fa40c653b
Merged-In: I48b1ccb61c807d0b41a165298ef5981258d6656e
2020-04-23 14:18:32 -07:00
Sudheer Shanka
3cd28c2a39 Reland "Pull service dumps to help debug test failures."
+ Convert tests to use Junit4
+ Add annotations to specify required conditions for the test to run.

This reverts commit 89099548f8.

Bug: 137859686
Change-Id: I7bb2a7e4b2dca3696761e7c030f3380b9226b676
Merged-In: I93317c201a0ea06732e29154ab7e140735381f59
2020-04-23 14:18:32 -07:00
Sudheer Shanka
03b91d2e5e [automerger skipped] Merge changes I05285811,I782f8a06,I7c5bf823,I7bb2a7e4 am: 8d7f5f0f9a -s ours
am skip reason: skipped by user sudheersai

Change-Id: I13d4668cb83890490a46ef63444ef6390d1e0e91
2020-04-23 19:33:11 +00:00
Sudheer Shanka
8d7f5f0f9a Merge changes I05285811,I782f8a06,I7c5bf823,I7bb2a7e4
* changes:
  Ensure location is enabled before getting SSID.
  Fix a regression in how required properties are collected.
  Fix Error Prone errors
  Reland "Pull service dumps to help debug test failures."
2020-04-23 17:57:10 +00:00
evitayan
8cfc634bbc Create base class that sets up test network
This class will be extended by both IkeSessionParamsTest and
IkeSessionTestBase

Bug: 148689509
Test: atest CtsIkeTestCases
Change-Id: I98979758a7a684219e35c02ded93224ea172d44f
2020-04-23 10:40:49 -07:00
Mark Chien
39a164dfd0 Merge "Test enable tethering permission and stopAllTethering" am: 34ec9b0db7
Change-Id: Ib650908fbb6e1fcb39689168e3d85e78c821e278
2020-04-23 13:14:52 +00:00
Mark Chien
34ec9b0db7 Merge "Test enable tethering permission and stopAllTethering" 2020-04-23 13:02:04 +00:00
evitayan
8af9ca27a2 Make a copy of TunUtils and PacketUtils
Temporarily make copies. Eventually will statically include the
source files in CtsIkeTestCases

Bug: 148689509
Test: atest CtsIkeTestCases
Change-Id: I7dd5c8b849f0d987fa6d76bc5a0bc1a7eed49b0d
2020-04-23 00:58:44 -07:00
Paul Hu
5401e02f81 Merge "Add TetheringCommonTests to CtsTetheringTest" am: e3ef038b64
Change-Id: I197a916efef48038a2c8a043f2d330c60a0cfbc3
2020-04-23 02:59:23 +00:00
Paul Hu
e3ef038b64 Merge "Add TetheringCommonTests to CtsTetheringTest" 2020-04-23 02:45:23 +00:00
Sudheer Shanka
0ac91b4737 Ensure location is enabled before getting SSID.
When location is disabled, Wi-Fi scan results and SSID are not available
to apps.

Fixes: 153850762
Fixes: 153396893
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I05285811d7131e116d5e1d072137ed2cf9576d05
Merged-In: I05285811d7131e116d5e1d072137ed2cf9576d05
2020-04-22 14:37:45 -07:00
Sudheer Shanka
a6a1ad183e Fix a regression in how required properties are collected.
+ Enable app standby mode before running the tests.

Fixes: 147459100
Fixes: 117169751
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: cts-tradefed run singleCommand cts-on-gsi --skip-device-info \
      --skip-preconditions -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I782f8a06922622d28f9a9d5c9f2afa2b12f8aa80
Merged-In: I782f8a06922622d28f9a9d5c9f2afa2b12f8aa80
2020-04-22 13:59:46 -07:00
Sudheer Shanka
39cc315273 Fix Error Prone errors
Soong wasn't including android_app or android_test sources in the
javac-check target used for the Error Prone build, which allowed
some Error Prone errors to get in.  Fix them so Error Prone can be
re-enabled for these targets.

Fixes:
cts/hostsidetests/net/app/src/com/android/cts/net/hostside/RequiredPropertiesRule.java:61: error: [CollectionIncompatibleType] Argument '~requiredProperty.getValue()' should not be passed to this method; its type int is not compatible with its collection's type argument Property

Bug: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I7c5bf823bf371902285ce3ee3929796fa40c653b
Merged-In: I48b1ccb61c807d0b41a165298ef5981258d6656e
2020-04-22 13:52:12 -07:00
Sudheer Shanka
1206400ccf Reland "Pull service dumps to help debug test failures."
+ Convert tests to use Junit4
+ Add annotations to specify required conditions for the test to run.

This reverts commit 89099548f8.

Bug: 137859686
Change-Id: I7bb2a7e4b2dca3696761e7c030f3380b9226b676
Merged-In: I93317c201a0ea06732e29154ab7e140735381f59
2020-04-22 12:27:50 -07:00
Treehugger Robot
22bda590b7 Merge "Update logic for checking NetworkSpecifier" am: eef8bc2050
Change-Id: Ifd4c3b1572c8957284ee57adcdc39ca8b9553859
2020-04-22 16:23:23 +00:00