Commit Graph

2621 Commits

Author SHA1 Message Date
Android Merger
fe6ecc7da7 Merge "Merge "[automerger skipped] Merge "Use a different key for signing networkpolicy test app." into oreo-mr1-cts-dev am: 4e67a8094e -s ours" into pie-cts-dev am: 352dda391e -s ours" 2018-08-15 04:12:36 +00:00
Sudheer Shanka
85f1387349 Merge "[automerger skipped] Merge "Use a different key for signing networkpolicy test app." into oreo-mr1-cts-dev am: 4e67a8094e -s ours" into pie-cts-dev
am: 352dda391e  -s ours

Change-Id: Ic3813b1149ab3cc718e0119794f7a58ea8bdb4dc
2018-08-14 21:12:14 -07:00
Android Merger
352dda391e Merge "[automerger skipped] Merge "Use a different key for signing networkpolicy test app." into oreo-mr1-cts-dev am: 4e67a8094e -s ours" into pie-cts-dev 2018-08-15 01:05:14 +00:00
Sudheer Shanka
6a2c9ec9bc [automerger skipped] Merge "Use a different key for signing networkpolicy test app." into oreo-mr1-cts-dev
am: 4e67a8094e  -s ours

Change-Id: I1c6594e5255883745690d5977c41ef9c8e529e71
2018-08-14 18:05:07 -07:00
Sudheer Shanka
497a93647c Use a different key for signing networkpolicy test app.
One of the preparation steps for running cts involves loading up the sim
card with the key used to sign CtsCarrierApiTestCases.apk. It
means if the same key is used for signing networkpolicy test app too,
then the app is considered as carrier privileged by the system and can't
be forced into app standby state.

Fixes: 77861812
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testDataSaverMode_disabled

Change-Id: Iaa9f4fabe83430fa42b6f67c1025db41a5e1d938
Merged-In: Iaa9f4fabe83430fa42b6f67c1025db41a5e1d938
2018-08-09 19:03:23 +00:00
Treehugger Robot
e5acef993c Merge "Merge pie-cts-dev into master." 2018-08-08 23:44:12 +00:00
Xin Li
8bf03f3725 Merge pie-cts-dev into master.
Bug: 112051819
Merged-In: I904b9b00a6ef206e75a67a6374fc71d00f64be43
Change-Id: I474fc4c2cc2d4a57b3c781d4b2ac666ebe261450
2018-08-08 19:32:29 +00:00
Xin Li
f8c5b15037 Merge "Merge Android Pie into master" 2018-08-07 16:51:29 +00:00
Xin Li
4227c4fc2f Merge Android Pie into master
Bug: 112104996
Change-Id: Icf38c8d11828f219c862aed4dbc35e5fddf716f5
2018-08-06 16:50:02 -07:00
Adam Vartanian
679ee7cbe7 CTS test for SslCertificate.getX509Certificate
Bug: 111696337
Bug: 36984840
Test: cts -m CtsNetTestCases -t android.net.http
Change-Id: I778a18fd3636efc1e60d61e6d2b78685635c07f8
2018-07-30 11:01:43 +01:00
Chenbo Feng
ac8ef7ce5c Merge "Skip the test if cannot open ctrl file"
am: 2ab9867d51

Change-Id: I813c36ecd545ee73cb05c28e1f444fc229084985
2018-07-26 21:06:31 -07:00
Treehugger Robot
2ab9867d51 Merge "Skip the test if cannot open ctrl file" 2018-07-27 03:48:14 +00:00
Chenbo Feng
cc7747d2de Skip the test if cannot open ctrl file
The shell access to the proc/xt_qtaguid/ctrl file is blocked in next
android release since no apps or users should directly read/write to
those proc files anymore. This CTS test is checking some critical kernel
behavior to make sure the xt_qtaguid module have specific kernel fixes.
So if the ctrl file is not accessible, there is no way to verify those
critical fixes, we can only skipped the test. These testcases are also
added in VTS qtaguid test so we can still check the devices have those
kernel fixes.

Bug: 110906349
Test: atest CtsNativeNetTestCases
Change-Id: Iae0512bb37f8b93577a134f15affb4f2a448be18
2018-07-26 18:53:23 -07:00
Neil Fuller
71286682ce Merge "Extend Uri tests"
am: 58f6083027

Change-Id: I659a205aeaea9910115ce48e98cd858e8e8423b7
2018-07-24 09:12:19 -07:00
Neil Fuller
d8eb370a89 Extend Uri tests
The internal UriCodec class is being removed from libcore/ and the
associated CTS tests are being removed. This change adds equivalent
URI decoding tests to the UriTest CTS test class.

Test: make droid && make cts
Test: run cts-dev -m CtsNetTestCases -t android.net.cts.UriTest
Bug: 111055375
Change-Id: Ided15d5abf8478064d193034e84c4dbe0689c6f0
2018-07-23 19:49:24 +01:00
Sudheer Shanka
841d4711be Use a different key for signing networkpolicy test app.
One of the preparation steps for running cts involves loading up the sim
card with the key used to sign CtsCarrierApiTestCases.apk. It
means if the same key is used for signing networkpolicy test app too,
then the app is considered as carrier privileged by the system and can't
be forced into app standby state.

Fixes: 80077890
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testDataSaverMode_disabled

Change-Id: Iaa9f4fabe83430fa42b6f67c1025db41a5e1d938
2018-06-19 19:35:00 -07:00
Etan Cohen
eeea3d5510 [RTT][CTS] Add information to assert to help debug failures
Modify the assert message to print out the # of failures and the total
number of iterations. Will help diagnose scope of test failures.

Bug: 109836816
Test: atest WifiRttTest
Change-Id: Ic4d5b6844225edbd9704694c539e31754b7a340c
2018-06-14 08:51:43 -07:00
Xin Li
b7e0399747 Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Bug: 79597307
Change-Id: I3f596f21ddcf35ca3a33c3f28da2cee4b1e04c25
2018-06-08 11:06:46 -07:00
Lorenzo Colitti
34087e0e40 Wait a few seconds for IPv6 connectivity to appear.
am: 78f8585339

Change-Id: I7aa572eb1dcead0e589a0b194556d732a0bf1e51
2018-06-05 02:31:56 -07:00
Lorenzo Colitti
78f8585339 Wait a few seconds for IPv6 connectivity to appear.
Currently, DnsTest immediately executes a DNS lookup as soon as
it starts. If the device has just connected to a network - as it
might if the test framework has just enabled wifi - and IPv6
connectivity is not yet available, the test will fail with little
proof that the network doesn't have IPv6.

Fix this by waiting for IPv6 connectivity and by adding the
active LinkProperties to the failure message.

Bug: 109670546
Test: DnsTest passes on dual-stack network
Test: DnsTest fails on IPv4-only network
Change-Id: I88b8d001f08fe41af666bccf8094c67729dda9c2
2018-06-05 16:12:41 +09:00
Sudheer Shanka
320a85eaa5 Merge "Update charge level too when turning battery off." into pi-dev
am: 484b49c41b

Change-Id: If5564af2f8238b1f1927ca91fa583468c57c0246
2018-06-01 12:50:58 -07:00
Sudheer Shanka
cd670e7957 Update charge level too when turning battery off.
BATTERY_CHARGING which triggers the parole state
will only be sent if the level is > 90.

Change-Id: I1073e473c27eb5d29744f4a967771392729b4e1a
Fixes:80534062
Test: Verified that updating the level activates the parole mode.
2018-05-31 11:43:40 -07:00
Sudheer Shanka
8157515480 Merge "Update turnBatteryOff to include changing charging status too." into pi-dev
am: 4ca791b07b

Change-Id: I96a16ae67e7186e710323a3f9760df341a647704
2018-05-23 12:01:05 -07:00
Sudheer Shanka
6987d0c61a Merge "CtsHostsideNetworkTests: Skip unsupported tests." into pi-dev
am: b3c2dad1eb

Change-Id: I52c4daca874fc580dcc663dc00ff7234c38bbb18
2018-05-23 10:43:14 -07:00
Sudheer Shanka
4ca791b07b Merge "Update turnBatteryOff to include changing charging status too." into pi-dev 2018-05-23 01:42:05 +00:00
Sudheer Shanka
b3c2dad1eb Merge "CtsHostsideNetworkTests: Skip unsupported tests." into pi-dev 2018-05-23 01:33:08 +00:00
Sudheer Shanka
1b3cc387bf Update turnBatteryOff to include changing charging status too.
AppStandbyController is now listening to BatteryManager.ACTION_CHARGING
for starting parole state and this broadcast won't be sent immediately
after plugging in the device. So, update the charging status too which is
going to trigger this broadcast and parole state can be started
immediately.

Bug: 80109076
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I6f19f7a509ec48e96eaea4b188262d5a9735edf1
2018-05-22 14:18:10 -07:00
Sudheer Shanka
926a3cb026 CtsHostsideNetworkTests: Skip unsupported tests.
If appStandby is not enabled, then
testAppIdleAndBatterySaver_tempPowerSaveWhitelists is not supported.

Fixes: 79942156
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I2f4012ff2cf42481e089d7fc33930258e501ddbf
2018-05-22 13:10:50 -07:00
Etan Cohen
8ed21e1c7d Merge "[RTT] Add sanity checks for RTT ranging results" into pi-dev
am: b5aeb0af4a

Change-Id: Ibfdc8e88ed59eb53dd7aa0435ce69dcb5d8f0db3
2018-05-21 17:49:57 -07:00
Etan Cohen
246d3f877d Merge changes from topic "wifi-rtt-cts" into pi-dev
am: 29a32336bd

Change-Id: I9c30879dfed7d1eb003f60adaccf8c4fd5d70e57
2018-05-17 08:47:44 -07:00
Etan Cohen
13c598050a [RTT] Add sanity checks for RTT ranging results
Add checks to validate that the reported number of measurements and
of successes is reasonable: non-zero for successful results.

Bug: 79879905
Test: 'atest WifiRttTest' passes
Change-Id: Ie79b10edacb660dd8c5d116539a4ee5cc32a779d
2018-05-16 15:44:42 -07:00
Etan Cohen
346856ab46 Revert "[RTT] Disable RTT CTS"
This reverts commit 14c32a88c15f2e00647a226c1e670967a683dcf7.

Enable Wi-Fi RTT CTS in production.

Bug: b/74457054
Test: atest CtsNetTestCases:WifiRttTest
Change-Id: Ia60776dbf60406d3665b01c7fecb3c9cd1a6c8ee
2018-05-16 15:31:57 -07:00
Etan Cohen
01d63b603e [RTT] Update CTS to auto-select test AP
Update CTS to select a test AP:
- Scan for APs
- Select the APs supporting IEEE 802.11mc
- Pick the AP with the highest RSSI

Bug: 74518964
Test: atest WifiRttTest (and pick the CTS test)
Change-Id: I6467c75eedcc8260703d2a99214154c9e888cce9
2018-05-16 15:31:57 -07:00
Etan Cohen
b58779a4e1 Revert "[RTT] Modify CTS tests to use associated AP information"
This reverts commit 47d58e2a69.

The revert restores the older method of test AP selction: hard
code the name of the test AP. Subsequent CLs will update to
preferred test AP selection method.

Bug: 74518964
Test: atest WifiRttTest (with rest of CL stack)
Change-Id: Iab71978607aeaf37babdb1afdaeca5c114ccdbf7
2018-05-16 15:31:57 -07:00
Sudheer Shanka
63d03b8026 Merge "Set stable_charging_threshold app idle constant to 0 during tests." into pi-dev
am: b1a7bb5f6c

Change-Id: Id639ff507eeaac701a066e0b6968e1a2aadbcd98
2018-05-09 10:30:49 -07:00
Sudheer Shanka
6dea1b7567 Set stable_charging_threshold app idle constant to 0 during tests.
Tests need the parole state to get started immediately after device
starts charging, so update stable_charging_threshold constant to 0.

Also simplify the logic to update the global setting as the tests only rely
on a couple of constants.

Fixes: 79319040
Test: Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ie9ef67bb1544dd0179980d537365d13e6b6020c1
2018-05-08 15:02:37 -07:00
Benedict Wong
86fb898c7f [automerger skipped] Merge "Add CTS support for eBPF" into pi-dev
am: 9d623ccbba  -s ours

Change-Id: Id64f9ef8bdcf15aba8db9d26d3cd2e0302c5e2d1
2018-05-08 10:38:26 -07:00
Benedict Wong
9d623ccbba Merge "Add CTS support for eBPF" into pi-dev 2018-05-08 17:13:45 +00:00
Roshan Pius
f53628831f Merge "WifiManagerTest: allow for multiple modes" into pi-dev
am: 1f34a7fcd9

Change-Id: I0738a52e6af618c7c739a1a1ec1aa434cfd7b1d3
2018-05-07 17:24:42 -07:00
android-build-prod (mdb)
67c176646e Merge "Directly test xt_qtaguid module without libcutls" am: 106fbc7f49
am: 9e0e1f7273

Change-Id: I043024cf889dca276976bf5af23c6f560791d993
2018-05-02 13:26:35 -07:00
Rebecca Silberstein
d8752ba525 WifiManagerTest: allow for multiple modes
Now that WifiService can/will support dual simultaneous mode operation, make
sure the tests allow for it as well.

Bug: 31346104
Test: atest android.net.wifi.cts
Change-Id: Id3aaacb3651568c18850a0fdf3832c0f52218cf2
2018-05-02 10:41:18 -07:00
android-build-team Robot
97a6c21f8d Merge "Directly test xt_qtaguid module without libcutls" into pi-dev
am: fde956376e

Change-Id: Ia7884e887e7808f9a6efe803290a27e9f370ab1f
2018-05-01 21:29:11 -07:00
Chenbo Feng
012d53ba16 Directly test xt_qtaguid module without libcutls
The libcutls library is no longer directly writing to the xt_qtaguid
module proc file. Instead, all the qtaguid related helper function is
moved to libqtaguid in P release. So the cts should directly call into
libqtaguid instead of using libcutils to do that, otherwise it will
faill on devices that using new traffic stats tools.

Bug: 78788976
Test: atest CtsNativeNetTestCases
Change-Id: I1169f598b6e558acf1d7724416b2b70abe2f5878
Merged-In: I1169f598b6e558acf1d7724416b2b70abe2f5878
(cherry picked from aosp commit 7d9870466bc5d57769fccf43ec3d1b2716f54b81)
2018-05-01 11:46:07 -07:00
android-build-prod (mdb)
106fbc7f49 Merge "Directly test xt_qtaguid module without libcutls" 2018-05-01 15:36:19 +00:00
Chenbo Feng
a82f259492 Directly test xt_qtaguid module without libcutls
The libcutls library is no longer directly writing to the xt_qtaguid
module proc file. Instead, all the qtaguid related helper function is
moved to libqtaguid in P release. So the cts should directly call into
libqtaguid instead of using libcutils to do that, otherwise it will
faill on devices that using new traffic stats tools.

Bug: 78788976
Test: atest CtsNativeNetTestCases
Change-Id: I1169f598b6e558acf1d7724416b2b70abe2f5878
2018-04-27 16:16:05 -07:00
Roshan Pius
a3a3cbe75a Merge "WifiManagerTest: Fetch scan results only on scan success" into pi-dev
am: 7b10bfaf01

Change-Id: If39364a768892573706c6555630bdd37869f523a
2018-04-26 14:21:44 -07:00
Benedict Wong
aa96bdc3a8 Merge "Add CTS support for eBPF" am: 5cf3c2fe86
am: 480d14e881

Change-Id: I8d0ff6e935d7495c14129fbf7334973417166bdd
2018-04-25 17:42:34 -07:00
Benedict Wong
27d1957bee Add CTS support for eBPF
Addition of eBPF requires tweaks regarding packet counting of
UDP-encapsulated-ESP packet bytes. This patch conditions the expected
number of bytes received based on eBPF being enabled

Bug: 74113670
Test: Ran CTS tests, passing on 3.18, 4.4, 4.9 kernels
Merged-In: If02a4bb6ebfdf949fdb58b5816aa9d252d9eef52
Change-Id: If02a4bb6ebfdf949fdb58b5816aa9d252d9eef52
(cherry picked from commit e061f54d7215729309e9e977743f5b28813878b0)
2018-04-25 13:58:14 -07:00
Roshan Pius
7457ee7eb8 WifiManagerTest: Fetch scan results only on scan success
When wifi location scans are off, the scan is expected to fail. But,
WifiManager.getScanResults() could still return results from the last
scan. This was causing the test to fail because it was relying on
|mScanResults| being null to detect scan failure.

Also, changed the scan done internal state name in the test to more accurately
reflect that scan has been completed (could be success or failure).

Bug: 77601152
Test: Ran `atest android.net.wifi.cts.WifiManagerTest#
testWifiManagerScanWhenWifiOffLocationTurnedOn` with location turned on,
but wifi scans turned off.

Change-Id: I6d5203a836d86d03fbb8e9af0035fe951a6b9db8
2018-04-24 13:56:43 -07:00
Benedict Wong
fe9b0a791e Add CTS support for eBPF
Addition of eBPF requires tweaks regarding packet counting of
UDP-encapsulated-ESP packet bytes. This patch conditions the expected
number of bytes received based on eBPF being enabled

Bug: 74113670
Test: Ran CTS tests, passing on 3.18, 4.4, 4.9 kernels
Change-Id: If02a4bb6ebfdf949fdb58b5816aa9d252d9eef52
2018-04-20 02:02:51 +00:00