Commit Graph

415 Commits

Author SHA1 Message Date
bohu
bd3520c0ef Merge "CTS: skip wifi related net test if no such feature am: 2fa6e7ce43 am: 40f71feca4" am: f9329b58df am: 1ec884189f am: d443dc8479
am: 056d20bbd4

Change-Id: I57419e01277c22bb7e441db798a4543ee3a93c25
2017-02-03 17:51:12 +00:00
bohu
056d20bbd4 Merge "CTS: skip wifi related net test if no such feature am: 2fa6e7ce43 am: 40f71feca4" am: f9329b58df am: 1ec884189f
am: d443dc8479

Change-Id: Iff152dacc120cb694219ca09aa768f9147ec6ad8
2017-02-03 17:47:05 +00:00
bohu
5e6a02e4a3 CTS: skip wifi related net test if no such feature am: 2fa6e7ce43
am: 40f71feca4

Change-Id: I4bbff2b7826bc627618c425243493c09feab3c96
2017-02-03 17:31:52 +00:00
bohu
40f71feca4 CTS: skip wifi related net test if no such feature
am: 2fa6e7ce43

Change-Id: If1a8a0143687113dcde6173dcad05ed14597f5a8
2017-02-03 17:29:09 +00:00
Paul Stewart
d4b573d247 Merge "Add CTS test for client certificate chains" am: 1663359290 am: 15504e6509 am: 59f642b278
am: e951221c2c

Change-Id: I524bb68f330aadfa2a4dda5b7b4857fd4a715576
2017-01-30 18:22:46 +00:00
Paul Stewart
e951221c2c Merge "Add CTS test for client certificate chains" am: 1663359290 am: 15504e6509
am: 59f642b278

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

Change-Id: I2071a0e4939c39b2f2defa4cdd8452d9cc2c87c7
2017-01-27 23:44:36 +00:00
Roshan Pius
9574de7d88 Merge "WifiManagerTest: |disableOthers| flag change" am: aaaca1cfc8 am: 76b4b52522
am: d434b47f1e

Change-Id: I1b1bffd06d41f7a0037a41c28018043777313ab7
2017-01-27 23:34:58 +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
f4cbea5f14 Merge "Replace strlen("foo") with sizeof("foo") - 1." am: a17d71f60a am: 386431a28c am: f7ce609edb
am: 6e8d9121d4

Change-Id: I72070a855929beb195058a3576fb1dfdf9761322
2017-01-26 22:07:08 +00:00
George Burgess IV
6e8d9121d4 Merge "Replace strlen("foo") with sizeof("foo") - 1." am: a17d71f60a am: 386431a28c
am: f7ce609edb

Change-Id: Ica1b820deed1f511e1557a6c9d49d8e375b68812
2017-01-26 22:03: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
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
Paul Duffin
038b6a4374 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
Change-Id: I0f34fe97154240e8f8eef6816df1c794da60351e
2017-01-20 11:22:59 +00:00
bohu
2fa6e7ce43 CTS: skip wifi related net test if no such feature
When a device does not have wifi feature,
we should skip wifi related net tests.

BUG: 31806034
Change-Id: I9867342c47499efc855a50a67a04177fa94e83e5
2017-01-19 14:07:58 -08: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
Glen Kuhne
6f819908c3 Merge "CTS: WifiManager.addNetwork with HttpProxy" 2017-01-17 21:38:31 +00:00
Glen Kuhne
55e97317e9 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
2017-01-17 10:53:25 -08:00
Neil Fuller
4b41bfc741 Merge "Add test for LocalSockets created from a FileDescriptor" am: fc8bbf5ceb am: abc0e7765d am: 6a89797685
am: 29ac7bce15

Change-Id: Iacbd3bfff156a3e18b3ce91c7c7ad99d2f891d4d
2017-01-11 15:37:34 +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
94fdf3394c Merge "Add more assertions related to LocalServerSocket.accept()" am: 863ff4a2cb am: a0c574dcc7 am: 0c14426eac
am: ca6100ad5f

Change-Id: I3249af4991f14694ebd0d5ae1f9888d100ff717a
2017-01-04 12:50:42 +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
Aaron Holden
37698cb72b Move libs/deviceutil to device-side/util
Test: build cts, run unit tests
bug:21762834
Change-Id: Ifd164ced7f040e312e3553f27adf59a648f463ab
2016-12-12 12:27:20 -08: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
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
Neil Fuller
a8574413ed Add CTS tests for LocalSocket read/write timeouts
The behavior was not previous covered and broke in N
due to commit c80af6d8. There is an associated fix
in frameworks/base.

Some refactoring of existing tests to reduce
duplication and tidy up sockets after tests.

Test: Ran the new CTS test (before and after related fix)
Bug: 31205169
(cherry picked from commit 52376fc1c8)

Change-Id: I9ee96a91abbdaaba64c2f6daf49c92d1b23352e2
2016-08-31 18:18:02 +01:00
Neil Fuller
52376fc1c8 Add CTS tests for LocalSocket read/write timeouts
The behavior was not previous covered and broke in N
due to commit c80af6d8. There is an associated fix
in frameworks/base.

Some refactoring of existing tests to reduce
duplication and tidy up sockets after tests.

Test: Ran the new CTS test (before and after related fix)
Bug: 31205169
Change-Id: Ie94335bc535beefcc5301d5469de6b8211af0bab
2016-08-31 13:12:54 +01:00
Neil Fuller
6406334d84 Merge "Initialize MockWebServer in setUp() not construction time"
am: f1026cb99e

Change-Id: I9c114d40171d73c90dcc4e2ef75a2239d39e4e81
2016-08-09 16:12:27 +00:00
Neil Fuller
f1026cb99e Merge "Initialize MockWebServer in setUp() not construction time" 2016-08-09 16:06:23 +00:00
Neil Fuller
a87e5240cc Initialize MockWebServer in setUp() not construction time
Should be a no-op but makes test suite creation cheaper.

Bug: 29820565
Change-Id: Ieee5568a6f477d591436275be4d4e7e3d5dbd322
2016-06-28 18:25:28 +01:00
Chih-hung Hsieh
9197c89071 resolve merge conflicts of 079d417 to stage-aosp-master
am: 64b0e44329

Change-Id: Ia3b91ebb942b4ab413ef4c76a06880c62e8581f9
2016-06-27 21:36:48 +00:00
Chih-Hung Hsieh
64b0e44329 resolve merge conflicts of 079d417 to stage-aosp-master
Change-Id: Ib8b7ed43d6c8dc4a9b843e6d2a974af30bcba0a0
2016-06-24 12:17:53 -07:00
Phil Weaver
3eab917a25 Merge \"CTS: Only listen to wifi events when toggling wifi\" into nyc-dev
am: 79fad1a209

Change-Id: Ieadf318b07d99acd8a2b73748fdac806731169d4
2016-06-23 01:57:27 +00:00
Phil Weaver
79fad1a209 Merge "CTS: Only listen to wifi events when toggling wifi" into nyc-dev 2016-06-23 01:48:11 +00:00
Phil Weaver
0d7d1da503 CTS: Only listen to wifi events when toggling wifi
When counting all connectivity changed events, we were failing
on devices with sim cards because we were counting both wifi and
mobile connectivity changes the same. Since the test only
toggles wifi, changing the listener only to pay attention to wifi
changes.

Bug: 29346253
Change-Id: I1ed3b976bc21419218c780d4afc4a5e73f128496
2016-06-22 16:50:38 -07:00
Chih-Hung Hsieh
60bd0b56fb Fix misc-macro-parentheses warnings in cts.
Add parentheses around macro arguments used beside operators.
Use 'aoto' type to avoid clang-tidy warnings of missing parentheses
of 'TYPE *'.

Bug: 28705665
Change-Id: I5d2c3b2bdfb7775200f31a011758b9a35b14794d
2016-06-22 14:29:53 -07:00
Daniel Xie
949d019a45 Merge \\\\\\"Remove non-CTS packets assertion code\\\\\\" into marshmallow-cts-dev am: 0ba763ab98 am: 6ce150c6ae am: 5c4a3982a8 am: fd1fb4d863 am: 995005d649
am: 86ba00d2a9

Change-Id: I5d1edb0f813aaf3aa6b4558e5ce21e6b60fa340d
2016-06-22 00:23:13 +00:00
Jun Tahara
86ba00d2a9 Merge \\\\\"Remove non-CTS packets assertion code\\\\\" into marshmallow-cts-dev am: 0ba763ab98 am: 6ce150c6ae am: 5c4a3982a8 am: fd1fb4d863
am: 995005d649

Change-Id: I40f34d7a22b09a4ef5a4190f2a236b643062f306
2016-06-22 00:20:07 +00:00
Jun Tahara
fd1fb4d863 Merge \\\"Remove non-CTS packets assertion code\\\" into marshmallow-cts-dev am: 0ba763ab98 am: 6ce150c6ae
am: 5c4a3982a8

Change-Id: Idcd4a248c8f74e095ba4162d8a468dbd962c8163
2016-06-22 00:14:51 +00:00
Lorenzo Colitti
0aeb28ea33 Merge \"Clear local test results across DNS lookups.\" into nyc-dev
am: cbdcf1d183

Change-Id: Id9a662ddec527356e0c8a2850da2dabca8a44fb9
2016-06-21 06:33:08 +00:00
Lorenzo Colitti
abc35d5527 Clear local test results across DNS lookups.
If InetAddress.getAllByName("ipv6.google.com") throws
UnknownHostException, the test silently ignores it. This
causes a misleading failure, because the test then reuses the
addrs variable that is left over from the previous DNS query
for "www.google.com", and fails because it has an IPv4 address.

Fixes: 12210306
Bug: 29231261
Change-Id: I1dde945765d40a84eba139055306b07ebc97d0ec
2016-06-21 13:39:49 +09:00
Jun Tahara
349f7ed040 Remove non-CTS packets assertion code
Symptom:
testTrafficStatsForLocalhost fails when applications or services
except CTS are using network.

Root cause:
testTrafficStatsForLocalhost can't calculate the number of
non-localhost packets for CTS.
It includes the all of packets for applications/services except CTS
and non-localhost packets for CTS.

Solution:
Remove this assertion and only logging the number of packets.

Change-Id: I49243d59f359f3a543c6bdb46f6a2645cde8f292
2016-06-20 17:50:39 +09:00
Lorenzo Colitti
d1970e861b Merge \"Log the address of the IPv4 address that causes the test to fail.\" into nyc-dev
am: db3485a45e

Change-Id: Id3818163f9fef1b2ba9d7b29f6b0f84c6659625d
2016-06-09 07:53:30 +00:00
Lorenzo Colitti
1d75845bd5 Log the address of the IPv4 address that causes the test to fail.
Bug: 29231261
Change-Id: I6aac389d2c234091a284486422ee663119d021a9
2016-06-09 14:38:03 +09:00
Phil Weaver
1a9e5fd490 Merge "CTS coverage: connectivity change, photo, + video" into nyc-dev
am: f057299a13

* commit 'f057299a13393fab596caccc3b9ac21fb5ecd599':
  CTS coverage: connectivity change, photo, + video

Change-Id: Ic97685bfc46ac46536116bebc3a257f5734532b1
2016-05-25 23:17:42 +00:00
Phil Weaver
36f05df51f CTS coverage: connectivity change, photo, + video
Confirming that connectivity change broadcasts can be received
when explicitly registering for them in N, and via the manifest
pre-N.

Confirming that new_photo and new_video broadcasts are not received.

Bug: 28122277
Change-Id: Icfc27364a41ee8f4a55920e295ba658a367bb7d2
2016-05-19 13:27:24 -07:00
Aaron Holden
769683c76d Merge "Remove module-level WifiCheck preparers" into nyc-dev
am: 4e0eb2e458

* commit '4e0eb2e4586a7e719e2deabcca1bd759a524a9e7':
  Remove module-level WifiCheck preparers

Change-Id: Iae73d1aaf52636a9e492e69dbedb590699ce2746
2016-05-16 22:57:18 +00:00