Commit Graph

545 Commits

Author SHA1 Message Date
Paul Stewart
59f642b278 Merge "Add CTS test for client certificate chains" am: 1663359290
am: 15504e6509

Change-Id: Iaf3cc041583a5dbc15130e795289aabbca912b8f
2017-01-30 18:15:14 +00:00
Treehugger Robot
1663359290 Merge "Add CTS test for client certificate chains" 2017-01-30 18:08:27 +00:00
Roshan Pius
d434b47f1e Merge "WifiManagerTest: |disableOthers| flag change" am: aaaca1cfc8
am: 76b4b52522

Change-Id: I8afe4aab7b34565ec5eac7ea274065d38aeb0696
2017-01-27 23:32:26 +00:00
Paul Stewart
9f295aaa43 Add CTS test for client certificate chains
Add tests to excercise new WifiEnterpriseConfig methods, including
setClientKeyEntryWithCertificateChain, and the new getters related
to it.

Bug: 34688653
Test: This is a test
Change-Id: I183166f5864c5ec77eb8590e2e0f521bbc7a39e7
2017-01-27 11:48:29 -08:00
Roshan Pius
446ca6fd2a WifiManagerTest: |disableOthers| flag change
Change the CTS test to reflect the change in behaviour of the
|disableOthers| flag in WifiManager.enableNetwork(). This will now just
be used as an indication to trigger connection to the specified network
instead of disabling all other configured networks.

Bug: 34765254
Test: Compiles
Change-Id: I97a5a84bb861e289d966552cea7f36d7dd4fd090
2017-01-27 18:54:55 +00:00
George Burgess IV
f7ce609edb Merge "Replace strlen("foo") with sizeof("foo") - 1." am: a17d71f60a
am: 386431a28c

Change-Id: I84aafb1fa79b7d16261d96a583348c0ad6bd044b
2017-01-26 21:59:05 +00:00
Treehugger Robot
a17d71f60a Merge "Replace strlen("foo") with sizeof("foo") - 1." 2017-01-26 21:49:09 +00:00
George Burgess IV
32599fd50c Replace strlen("foo") with sizeof("foo") - 1.
We have an upcoming change to Bionic that no longer allows us to treat
strlen("foo") as a constant expression, which causes this bit of code to
no longer compile. So, we need to either use __builtin_strlen("foo") or
sizeof("foo") - 1 instead. (Note that the *optimizer* can still turn it
into a constant, but optimization happens after we figure out if
something is actually a constant expression or not.)

sizeof("foo") is used elsewhere in this file, so I just went with that.

Bug: 32073964
Test: Now builds.
Change-Id: I2797ee75fd114e237de8e97c50549763c88f73f4
2017-01-25 19:20:09 +00:00
Paul Duffin
42f777bbb6 Merge "Prepare for removal of legacy-test from default targets" am: 777c5a3ea1
am: 2d7a0786b5

Change-Id: I3d450f4890825f5ad261b01ae9bd1a1b01a640c7
2017-01-20 14:05:29 +00:00
Paul Duffin
d872302cdb Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Merged-In: I0f34fe97154240e8f8eef6816df1c794da60351e
Change-Id: I7e3b028321c42b7427d79365eb3f51ddf896f930
2017-01-20 11:38:45 +00:00
Glen Kuhne
968719035d Merge "CTS: WifiManager.addNetwork with HttpProxy" am: b99788eb24
am: 155a81349f

Change-Id: I0b4f12d41263db0fd69cce933af915f46fa3ff31
2017-01-18 18:24:45 +00:00
Glen Kuhne
1b93dea624 CTS: WifiManager.addNetwork with HttpProxy
Added CTS tests verifying, that adding a WifiConfiguration containing an
httpProxy will:
-Succeed if caller is DeviceOwner
-Fail if caller is not DeviceOwner

Test: Added two CTS tests
Bug: 14669153
Change-Id: I2c81492dba5052117a03a2aa7b3cc8ffb5d52d5f
Merged-In: I2c81492dba5052117a03a2aa7b3cc8ffb5d52d5f
2017-01-17 15:33:48 -08:00
Neil Fuller
6a89797685 Merge "Add test for LocalSockets created from a FileDescriptor" am: fc8bbf5ceb
am: abc0e7765d

Change-Id: Ia1ef9e648c7afa55406793803f579db90844e864
2017-01-11 13:47:20 +00:00
Neil Fuller
a3577f20f2 Add test for LocalSockets created from a FileDescriptor
Adding a test to catch future regressions with this code
path.

Bug: 34095140
Test: vogar --mode app_process tests/tests/net/src/android/net/cts/LocalSocketTest.java
Change-Id: I648ed87d4b9e7fa25787c150f08351c6faf55496
2017-01-06 14:16:22 +00:00
Neil Fuller
0c14426eac Merge "Add more assertions related to LocalServerSocket.accept()" am: 863ff4a2cb
am: a0c574dcc7

Change-Id: I90164b0ee1b7301fd4f99c530fd6f7159aba780c
2017-01-04 12:37:43 +00:00
Neil Fuller
d9e98a6688 Add more assertions related to LocalServerSocket.accept()
The isConnected() / isBound() behavior is new, the behavior
when bind() / connect() is called is not. See related
frameworks/base changes.

Test: Tests run under vogar.
Bug: https://code.google.com/p/android/issues/detail?id=35942
Change-Id: I8577212270f3b3e76ea015914eebddc0fe4a6afa
2017-01-04 10:40:36 +00:00
Baligh Uddin
3c9b149b01 Merge remote-tracking branch 'goog/cw-f-dev' into fix_merger
Bug: 32849428
* goog/cw-f-dev: (122 commits)
  Fixed CTS unit tests
  Fixing layout of several test suites for round screens.
  Fix test case context which is not fully visible on wear.
  Fix build for nyc-dr1-dev
  Check that H.264 is available before checking max frame rate
  DO NOT MERGE: Bump CTS and CTS Verifier to 5.1_r14
  DO NOT MERGE: Bump CTS and CTS Verifier to 6.0_r13
  Run DynamicConfig setup twice
  DO NOT MERGE: Bump CTS and CTS Verifier to 7.0_r4
  Fix UserRestrictionsTest.testUserRestrictions_secondaryProfileOwnerOnly
  Generate and include checksum data with CTS report submissions Test: Used exploratory tests and unit tests in ChecksumReporterTest.java to verify the behavior. * All TestResults are added from an InvocationResult * Able to verify TestResult against previously calculated checksum * CRCs are created for all files in a directory including subdirectories * Checksum integrity is maintained while serializing to/from disk * When possible checksum data is compressed before report submission
  Add retry logic for adoptable storage tests
  Catch case where browser is protected by a permission
  Fix failure due to accessibility node not updated after scrolling.
  Fix DO/PO Wifi CTS
  Test: Fix testFindAll result listener not set issue
  Updating CTS Security patch to 2017-01
  DO NOT MERGE ANYWHERE: bump cts for 201701 security public bulletin
  DO NOT MERGE ANYWHERE: bump cts for 201701 security public bulletin
  CTS Test for security vulnerability fix: Effect command might allow negative indexes
  ...

Change-Id: I07b3bb0249eebcae5760d08c98cdde1ac5b01601
2016-11-22 17:13:49 -08:00
Chris Manton
a84bb771d1 Include Wear device idle settings
Certain tests interacting with device idle
must set correctly both the normal and wear
device idle setting space.

Bug: 32183373

Test: Run on wear device and Nexus6P
run cts --skip-device-info -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testDozeModeMetered_enabledButWhitelistedOnNotificationAction
run cts --skip-device-info -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction

Change-Id: I6a53d29021a7d4a257b102a4d3bd5d2cc845c16f
2016-11-07 13:45:48 -08:00
Paul Stewart
1db013fafc Merge "CtsNetTests: Add a test for b/25624963" am: 9ec7e2127c
am: 26fc3c1dd7

Change-Id: I718a3b9891c4323ce0c8a3858bb0162ac9878aa7
2016-10-19 21:57:34 +00:00
Paul Stewart
26fc3c1dd7 Merge "CtsNetTests: Add a test for b/25624963"
am: 9ec7e2127c

Change-Id: I8d9b6e56051b31e9c410b8b7009398df9b4fcaf1
2016-10-19 21:49:30 +00:00
Paul Stewart
22b355560e CtsNetTests: Add a test for b/25624963
Ensure that password is not output in toString() for an enterprise
credential.

Bug: 25624963
Test: Run this CTS test: run cts --module CtsNetTestCases --test android.net.wifi.cts.WifiEnterpriseConfigTest#testEnterpriseConfigDoesNotPrintPassword
Change-Id: I84a62ae5d37aa7d397203f41362dadb8ceba1e62
2016-10-19 10:46:09 -07:00
Nicolas Boichat
4074750e69 PacketReflector: Ignore IPv6 flow labels in ICMPv6 test am: 36c0f02d94 am: 516b0616e9 am: fac99e31ce am: 171491fa35 am: 983fbfccec
am: d9559a2b24

Change-Id: I1363706a3bd646cb07043f5dc906ddc315667a0e
2016-10-17 17:43:13 +00:00
Nicolas Boichat
983fbfccec PacketReflector: Ignore IPv6 flow labels in ICMPv6 test am: 36c0f02d94 am: 516b0616e9 am: fac99e31ce
am: 171491fa35

Change-Id: I66ef990f1d3e84590409a546f0b5eff307c32bba
2016-10-17 17:23:12 +00:00
Nicolas Boichat
171491fa35 PacketReflector: Ignore IPv6 flow labels in ICMPv6 test am: 36c0f02d94 am: 516b0616e9
am: fac99e31ce

Change-Id: Ib46e30a62620b942afc54d92b1da62412308095a
2016-10-17 17:10:49 +00:00
Nicolas Boichat
516b0616e9 PacketReflector: Ignore IPv6 flow labels in ICMPv6 test
am: 36c0f02d94

Change-Id: Icc98803ea5d4f52cefb43b40d2dcfbd76de1b464
2016-10-17 05:15:47 +00:00
peter_li
24c9b794f6 [CTS]It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for CtsHostsideNetworkTests test case. am: 2ecad8d87d am: ca83ca8472
am: 9e20cad5eb

Change-Id: Ib41d8d3c39c5eaf256541883ec9462af544ed605
2016-10-13 16:03:54 +00:00
peter_li
dc396795cc [CTS]It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for CtsHostsideNetworkTests test case. am: 2ecad8d87d am: ca83ca8472
am: 254dfe5017

Change-Id: I5955ae432dfe4fd5f751bcf79d307b556e38ac37
2016-10-13 16:03:47 +00:00
peter_li
9e20cad5eb [CTS]It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for CtsHostsideNetworkTests test case. am: 2ecad8d87d
am: ca83ca8472

Change-Id: I4a497994d5e6c9f8de979ac9bcf05b6be4ce846c
2016-10-13 15:56:56 +00:00
peter_li
254dfe5017 [CTS]It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for CtsHostsideNetworkTests test case. am: 2ecad8d87d
am: ca83ca8472

Change-Id: Id254c85d140dd854e095e47c1465b73426053fc5
2016-10-13 15:56:52 +00:00
peter_li
ca83ca8472 [CTS]It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for CtsHostsideNetworkTests test case.
am: 2ecad8d87d

Change-Id: If9c72d61d403b37ecd398179d5d3b447d252d7dc
2016-10-13 15:49:16 +00:00
Tina Zhou
e7c890f1e5 Merge "[CTS]It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for “CtsHostsideNetworkTests” test case." into nougat-cts-dev 2016-10-13 15:39:50 +00:00
peter_li
2ecad8d87d [CTS]It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for “CtsHostsideNetworkTests” test case.
Symptom: It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for “CtsHostsideNetworkTests” test case.
Root Cause: The test function “setBatterySaverMode” of “CtsHostsideNetworkTests” use command to set setting DB when trying to turn on battery saver. But while trying to turn off battery saver, it only use charger plug-in event. It should be more reasonable to turn off battery saver through similar DB setting as this function did at turning on.
Solution: To control battery saver function from setting DB.
Project:
Note:
Test done by RD:
Futher testing need Q team's support:

Bug: 31897608

Change-Id: Id70ba458e85f98393d7652bb4e79bd182172c60f
2016-10-13 07:36:53 +00:00
Amith Yamasani
926802bcaa Test to ensure a toast doesn't affect app standby am: 87c10012b4
am: a79fdc6a3e

Change-Id: Ifc27411d8075cd7174037707f80f4be36e2581a6
2016-09-22 01:33:49 +00:00
Amith Yamasani
87c10012b4 Test to ensure a toast doesn't affect app standby
Put an app in standby, make it show a toast and ensure
that it doesn't come out of standby. This is to test
for a bug fix for the same behavior.

Bug: 31544592
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdle_toast
Change-Id: I796ecde8e346c308a27969d873e3ce384414fee3
2016-09-21 12:46:52 -07:00
Dan Willemsen
4a0758045c DO NOT MERGE ANYWHERE Actually fix cts in nyc-dev-plus-aosp
I did this manually first, but came up with a much better way that
produced a slightly better result (verified the diffs against the next
branch). Sequence of commands:

 # Checkout the last good commit (right before the first bad merge)
 git checkout aa76e8b6fc8515bfc65d4b75456b74c26ee32f1e^
 # Reset the HEAD pointer to the last bad merge, but not the worktree
 git reset 3c197891b50d9ac5e5016f55551b6dff82f62f33
 # Update the index
 git add -A
 # Apply all the changes that mattered between the above to commits
 git cherry-pick -n 29cb19b774b6e0cb73851feb6877da5e42bba78e
 git cherry-pick -n 0e9d107fcfbd3421b7988a4252a9965896019aba
 git cherry-pick -n f19496887beb974c3bc9df9a57f6214a696417b1
 git cherry-pick -n 939e2b253b798386ce53954626fd8044ecb18db6
 git cherry-pick -n 02f07b5d5994b8345ebc86546e5f66524ac04dac
 # Commit the changes
 git commit
 # Rebase the diffs on top of the latest nyc-dev-plus-aosp, since some
 # changes have been manually applied, there will be a few merge
 # conflicts
 git rebase goog/nyc-dev-plus-aosp

All the SHA-1s above were discovered using a combination of this command
to find the changes actually submitted into nyc-dev-plus-aosp itself:

  git log --oneline --first-parent goog/nyc-dev-plus-aosp

and then to find the original commits (that weren't marked as DO NOT
MERGE ANYWHERE):

  git log --oneline --no-merges --stat aa76e8b..goog/nyc-dev-plus-aosp

Change-Id: Iec12619678cb8d011d2c6df26a34ce26e042b854
2016-09-20 05:56:27 +00:00
Amith Yamasani
6a24e5df31 Tests for idle parole when charging am: 2855028c8e
am: 22fcfb341a

Change-Id: Ie0dbb02f9c06aa2dfd358847aa624f07c1cff28f
2016-09-20 02:23:18 +00:00
Amith Yamasani
2855028c8e Tests for idle parole when charging
Make sure that when switching between idle, paroled
and battery saver, the network availability of the app
is correctly updated.

Bug: 31399882
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdleNonMetered_whenCharging
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdleMetered_whenCharging
Change-Id: I060a0d5f9c3297430b5b623b389c1afdf6abde87
2016-09-19 13:33:27 -07:00
Stephen Li
0d9ef269a9 Revert "Manually merge commit '9be9d5865ba2584a251642359710c074061dee5e' into nyc-dev"
am: 07f9388e4f

Change-Id: I33126a859f4cf14227f743b74fd965b3a0737e9b
2016-09-14 22:36:57 +00:00
Stephen Li
07f9388e4f Revert "Manually merge commit '9be9d5865ba2584a251642359710c074061dee5e' into nyc-dev"
This reverts commit 253fdc667a.

Change-Id: If8862e289eb6693650713ff819c8b05f65cdeda5
2016-09-14 22:25:06 +00:00
Nicolas Boichat
36c0f02d94 PacketReflector: Ignore IPv6 flow labels in ICMPv6 test
Since Linux kernel 4.2, net.ipv6.auto_flowlabels is set by default, and
therefore the request and reply may have different IPv6 flow label.

Bug: 31444338
Test: On a kernel 4.4 board, run com.android.cts.net.HostsideNetworkTests#testVpn
Test: On a kernel 3.18 board, run echo 1 > /proc/sys/net/ipv6/auto_flowlabels, then
      com.android.cts.net.HostsideNetworkTests#testVpn
Change-Id: I913bbf91574239a24cb32ae908834eb951ea2010
2016-09-13 17:32:40 +08:00
Daniel Xie
9be9d5865b Merge "CameraITS scene5 should be skipped if read_3a is not supported" into nougat-cts-dev 2016-09-09 03:33:03 +00:00
Ian Rogers
774ce009c2 Fix to CtsHostsideNetworkTestsAidl Java library kind. am: 03ee9869ac am: 2984490109
am: 71ae4905ac

Change-Id: I9c7829dbf1798003294da17dfd8e11ca128bd2f2
2016-09-08 12:03:23 +00:00
Ian Rogers
71ae4905ac Fix to CtsHostsideNetworkTestsAidl Java library kind. am: 03ee9869ac
am: 2984490109

Change-Id: I2892485750d0fb055b20af40a54ea601e9ff5a0e
2016-09-08 11:17:05 +00:00
Ian Rogers
03ee9869ac Fix to CtsHostsideNetworkTestsAidl Java library kind.
Fixes Error Prone build.
Bug: 27723540

(cherry picked from commit ad015ac64d0e510cc040a83b1d545e3a1405b1f7)

Change-Id: I150aefde61615023e86e19645a46e432a0183705
2016-09-08 10:51:30 +01:00
sj.cha
560981b972 Merge "Add some failure comments in VpnTest" am: cf8d6e3253 am: 060aa462cb
am: ee2b139f7a

Change-Id: I225d762890934b8f2355d4a2783cc6d2227a90f3
2016-09-08 09:37:10 +00:00
sj.cha
ee2b139f7a Merge "Add some failure comments in VpnTest" am: cf8d6e3253
am: 060aa462cb

Change-Id: Ifb3c10aa186d99add321102d503007b857eba78e
2016-09-08 09:34:36 +00:00
Treehugger Robot
cf8d6e3253 Merge "Add some failure comments in VpnTest" 2016-09-08 09:24:11 +00:00
Roshan Pius
bb422cf538 Merge "CtsNetTests: Fix WifiInfoTest" am: 133d0c3dad am: b75c380c17
am: e1794e1518

Change-Id: I55a18563f1ee80cda8064c12cf90092e7945697b
2016-09-07 17:57:57 +00:00
Roshan Pius
e1794e1518 Merge "CtsNetTests: Fix WifiInfoTest" am: 133d0c3dad
am: b75c380c17

Change-Id: I62e56e6c6862eb15e2e86c88b1c3ba6f804291b6
2016-09-07 17:52:09 +00:00
Roshan Pius
f1bb48635d CtsNetTests: Fix WifiInfoTest
According to the public documentation of WifiInfo.getSSID(), the
returned value can be one of the following:
1. Hex digits if the SSID cannot be decoded as UTF-8.
2. String surrounded by double quotes if the SSID can be decoded as
UTF-8.
3. <unknown ssid>, if not connected.

Fix the test to check for all these 3 string values.

BUG: 31272462
TEST: The failing CTS test passes now.
Change-Id: I26e12d28994e3cdb4cd1bd9e999633b327ad5830
2016-09-07 08:56:45 -07:00