Commit Graph

984 Commits

Author SHA1 Message Date
Marco Nelissen
8653b32a48 Merge remote-tracking branch 'aosp/nougat-mr1-cts-dev' into master
Test: built
Merged-In: I0e9438d5fdb01c94077aa22cdf402dee8bf5ec97
Change-Id: Idbd20b12eec0440369b37316f9ab2c84978f7725
2017-01-27 23:14:25 +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
Treehugger Robot
777c5a3ea1 Merge "Prepare for removal of legacy-test from default targets" 2017-01-20 13:59:18 +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
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
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
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
Paul Stewart
26fc3c1dd7 Merge "CtsNetTests: Add a test for b/25624963"
am: 9ec7e2127c

Change-Id: I8d9b6e56051b31e9c410b8b7009398df9b4fcaf1
2016-10-19 21:49:30 +00:00
Treehugger Robot
9ec7e2127c Merge "CtsNetTests: Add a test for b/25624963" 2016-10-19 21:40:37 +00:00
Nicolas Boichat
1cdcb253df PacketReflector: Ignore IPv6 flow labels in ICMPv6 test am: 36c0f02d94 am: 5696846426 am: ffe4cefe73 am: c4df82d292 am: 3342023de9 am: d8bd696559
am: 5ee79a1d24

Change-Id: I16a1aff1ea228f93e3abd8a50cb453f073d7f85d
2016-10-19 19:39:58 +00:00
Nicolas Boichat
5ee79a1d24 PacketReflector: Ignore IPv6 flow labels in ICMPv6 test am: 36c0f02d94 am: 5696846426 am: ffe4cefe73 am: c4df82d292 am: 3342023de9
am: d8bd696559

Change-Id: I0d634d5a57b4a93963e4f93e5572b9bef715af58
2016-10-19 18:04:32 +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
d8bd696559 PacketReflector: Ignore IPv6 flow labels in ICMPv6 test am: 36c0f02d94 am: 5696846426 am: ffe4cefe73 am: c4df82d292
am: 3342023de9

Change-Id: I6c3da43716d4072e6f0beb3e3a2b5b0bffa0aba3
2016-10-18 00:17:23 +00:00
Nicolas Boichat
c4df82d292 PacketReflector: Ignore IPv6 flow labels in ICMPv6 test am: 36c0f02d94 am: 5696846426
am: ffe4cefe73

Change-Id: Ib17900cfd7e3371c6afb703c956dd9d4aa7e26f1
2016-10-17 22:04:33 +00:00
Nicolas Boichat
5696846426 PacketReflector: Ignore IPv6 flow labels in ICMPv6 test
am: 36c0f02d94

Change-Id: Ic7b755d02b3d1b85fbbff7d22554128079fc5a37
2016-10-17 21:50:57 +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
fac99e31ce PacketReflector: Ignore IPv6 flow labels in ICMPv6 test am: 36c0f02d94
am: 516b0616e9

Change-Id: Ib0bdd7ba610c8206356233620c8941695eeaf9a6
2016-10-17 05:23:18 +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
Tina Zhou
6854180825 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 am: e7c890f1e5 am: 4c76844837 am: 908de2e143 am: e7fd69c032
am: 6a52d04b89

Change-Id: I9456cd8e987fcdbbb16a5854b39b985e9de2a513
2016-10-13 16:19:52 +00:00
peter_li
058a74f477 [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 am: dc396795cc
am: efa1aec0f5

Change-Id: Id0e7fa322adc40ee64545801b27f1c81a2964f39
2016-10-13 16:19:20 +00:00
Tina Zhou
6a52d04b89 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 am: e7c890f1e5 am: 4c76844837 am: 908de2e143
am: e7fd69c032

Change-Id: I21f7f431cf0c8e74ba77e62232c4628c6272d8af
2016-10-13 16:12:40 +00:00
peter_li
efa1aec0f5 [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
am: dc396795cc

Change-Id: I97f5aa84b291e02e98fd6392d10c3879eceff19d
2016-10-13 16:12:17 +00:00
Tina Zhou
1e57f971a4 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 am: e7c890f1e5 am: 4c76844837
am: 1ef49dfc5d

Change-Id: I58ab049d06fc2a2c5afecdf3b5b440a1c9e5eb61
2016-10-13 16:04:17 +00:00
Tina Zhou
e7fd69c032 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 am: e7c890f1e5 am: 4c76844837
am: 908de2e143

Change-Id: Ifcf1b2894ba80e4eedc346d2d118b8bd1d66375a
2016-10-13 16:04:11 +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
Tina Zhou
1ef49dfc5d 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 am: e7c890f1e5
am: 4c76844837

Change-Id: I123fbb1cf5ffa0b7fd8ba42ad554d9b6465646d2
2016-10-13 15:57:25 +00:00
Tina Zhou
908de2e143 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 am: e7c890f1e5
am: 4c76844837

Change-Id: Id59f50335fc16f56101f6d35dfc976bf2bcd285a
2016-10-13 15:57:12 +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
Tina Zhou
4c76844837 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
am: e7c890f1e5

Change-Id: I5580f0fdbfae37f0949af40988e0a5585e8e4a7f
2016-10-13 15:49:18 +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
Stephen Li
3325c61fdd BUG:31504066 Skip merge of d6eb16d into nyc-dev am: e86d0c3689 am: db15235313 am: 4714e3983e
am: e252b4984e

Change-Id: I96e70ae647ec5f3973f06d10443a96885d4f422d
2016-10-07 22:21:58 +00:00
Stephen Li
e252b4984e BUG:31504066 Skip merge of d6eb16d into nyc-dev am: e86d0c3689 am: db15235313
am: 4714e3983e

Change-Id: Ib93d5d465c553991a26657844e664a6e0ba994cb
2016-10-07 22:13:26 +00:00
Stephen Li
4714e3983e BUG:31504066 Skip merge of d6eb16d into nyc-dev am: e86d0c3689
am: db15235313

Change-Id: I1720a108232f137106a21fc1445b80d3cb67ff14
2016-10-07 22:08:54 +00:00
Stephen Li
c83ea00deb BUG:31504066 Skip merge of d6eb16d into nyc-dev am: e86d0c3689
am: e6a6bec385

Change-Id: I03f900da3bb9645e9fc281700ce75e8fcbf9032e
2016-10-07 22:04:57 +00:00
Stephen Li
db15235313 BUG:31504066 Skip merge of d6eb16d into nyc-dev
am: e86d0c3689

Change-Id: If58f1af63e917cba56e55b26ea555695e08935b1
2016-10-07 22:04:54 +00:00
Stephen Li
e6a6bec385 BUG:31504066 Skip merge of d6eb16d into nyc-dev
am: e86d0c3689

Change-Id: Iaaf5ecfa69cfde1aa4d58e10db901e0f03d7f82e
2016-10-07 22:00:54 +00:00
Stephen Li
e86d0c3689 BUG:31504066 Skip merge of d6eb16d into nyc-dev 2016-10-07 12:58:55 -07:00
Stephen Li
d6eb16d248 Merge changes from topic 'aosp_snafu_fix' into nougat-cts-dev
* changes:
  Improve robustness of MediaSyncTest
  Handle inconsistent values for PR_SET_TIMERSLACK_PID in android.os.cts.SeccompTest.
  Fix a memory corruption (NativeCodeTest testPipeReadV)
  Add option logcat-on-failure-size to CTS and GTS
  Require android.software.device_admin for certain CtsVerifier tests
  Make "done" phase of ScreenPinningTestActivity reentrant.
  MediaSyncTest: increase ramp up time due to initial latency in AudioTrack.
  DO NOT MERGE ANYWHERE: CameraITS: allow each scene to be ran independently
  CameraITS scene4 should be skipped if read_3a is not supported
  CameraITS scene5 should be skipped if read_3a is not supported
  BUG:31504066 Reset to 94b4be7 with history
2016-10-07 19:04:51 +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
a79fdc6a3e Test to ensure a toast doesn't affect app standby
am: 87c10012b4

Change-Id: Ib0d657b8f6ca5fe4d25f96031fe8a662c7b5302f
2016-09-21 21:58:13 +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
a09564210e DO NOT MERGE ANYWHERE Actually fix cts in nyc-dev-plus-aosp
am: 4a0758045c  -s ours

Change-Id: I7c670287304269c38e12f50e71e242b8b2d77068
2016-09-20 06:37:27 +00: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