Commit Graph

772 Commits

Author SHA1 Message Date
Luke Huang
8fd0506401 Add more test for async DNS api
Bug: 129395490
Test: atest DnsResolverTest
Change-Id: I4d2cdc2be577846c08dfe994da60965f983acb97
2019-03-29 17:09:57 +08:00
Luke Huang
92f1edd2f0 Improve cancellation test for async DNS API
After having a lock between callback and cancellationsignal,
errno with EBADF should not happen.

Bug: 129317069
Test: atest DnsResolverTest
Change-Id: I08e800b078d40345eb3f46da1323db251c8dcd47
2019-03-28 21:06:30 +08:00
Lorenzo Colitti
3852fd92f5 Fix expected reverse lookup of Google DNS IP addresses
DnsTest.testDnsWorks expects that reverse lookup for the Google
public DNS servers will return something with google.com in the
name. This no longer works because the reverse DNS entries have
changed to dns.google.

Bug: 129452237
Test: atest android.net.cts.DnsTest.testDnsWorks
Change-Id: Iee8bfe418bf6003e5c78df77d75f6f9745249267
2019-03-28 17:41:13 +09:00
Luke Huang
acadb939b5 Improve test and fix doulbe-close fd problem for async DNS API cts
1. Change test cases for enlarging buffer size of FrameworkListener.
2. Remove test procedure which caused doulbe-close fd.

Bug: 129317069
Bug: 126307309
Test: atest CtsNativeNetDnsTestCases MultinetworkApiTest
Change-Id: I8d871cebca6fa7e298a874ba430ec0aaa05c0eed
2019-03-26 20:33:43 +08:00
Treehugger Robot
d01197426b Merge "Enable instant and ABI XML tags for native networking tests." 2019-03-25 06:31:59 +00:00
Lorenzo Colitti
f011d5f95b Enable instant and ABI XML tags for native networking tests.
These tests include native code so mark them as multi_abi. They
also pass in instant mode so mark them instant_app.

Fix: 123367032
Fix: 123367595
Test: atest CtsNativeNetDnsTestCases CtsNativeNetTestCases
Test: cts-tradefed run commandAndExit cts --enable-parameterized-modules --module-parameter instant_app -m CtsNativeNetDnsTestCases
Test: cts-tradefed run commandAndExit cts --enable-parameterized-modules --module-parameter instant_app -m CtsNativeNetTestCases
Change-Id: Id66705ecb012a07aa34318f41afb1840dd25b9e3
2019-03-25 13:41:38 +09:00
Luke Huang
bb891d5a24 Merge "Add cancel test cases for async DNS API" 2019-03-22 03:26:21 +00:00
Paul Hu
d2a4a1cd8d Merge "Fix API Review issues." 2019-03-21 17:19:26 +00:00
Luke Huang
361584140b Add cancel test cases for async DNS API
Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest

Change-Id: I9b496821e422f71009319eeefc6f3c6c1e249111
2019-03-17 15:37:15 +00:00
Luke Huang
24c8d2ab38 Alter CTS tests for change of async DNS API
Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest

Change-Id: If823a27773cc778fba49db02045b77222c4cd1af
2019-03-17 15:37:05 +00:00
Luke Huang
26cc1b4a04 Improve test for the changing of DnsResolver
1. Done for some code-style nits.
2. Update tests because AnswerCallback of DnsResolver is changed.

Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest

Change-Id: Ie862c7ea5077f56fd9a4d96baf3f466b65db93d8
2019-03-17 14:19:32 +00:00
paulhu
3953e40365 Fix API Review issues.
Modify the method name in LinkProperties.

Bug: 126699682
Test: make cts passed.
Change-Id: I3729e8915a8eff36e8de9035b5bf1571f8609e42
2019-03-14 10:30:06 +08:00
Luke Huang
db7e161d85 Merge "Minor changes and more cts tests for DnsResolver" 2019-03-08 03:19:55 +00:00
Luke Huang
652fc29761 Merge "Minor change for jni cts test of asynchronous DNS query API" 2019-03-08 03:19:41 +00:00
Luke Huang
a0629ad8b9 Minor changes and more cts tests for DnsResolver
Test: built, flashed, booted
      atest DnsResolverTest

Change-Id: I39f24b9751ab507bf7fc6bcd90376fafc60221b8
2019-03-07 16:49:17 +08:00
Benedict Wong
774ee87692 Merge "Remove point-to-point assertion in IpSecManagerTunnelTest" 2019-03-06 02:55:20 +00:00
Benedict Wong
7513ebc64f Remove point-to-point assertion in IpSecManagerTunnelTest
This change removes the requirement for IPsec interfaces to be
point-to-point. The two implementations (VTI vs XFRMI) have different
point-to-point values, and as such, this assertion is no longer valid.

Bug: 126578549
Test: Ran tests against XFRM-I kernels
Change-Id: I0597e0aa86ccea2cd28d7c5e02063c788ddb08b8
2019-03-04 11:57:19 -08:00
Treehugger Robot
c4c0bb37cf Merge "Migrate cts/tests/tests/net to androidx.test" 2019-03-02 00:45:26 +00:00
Brett Chabot
420804ce3e Migrate cts/tests/tests/net to androidx.test
See go/jetpack-test-android-migration

Test: m -j CtsNetTestCases
Change-Id: I4a76e9b9410f94e297bca4287f450fe3b72fb409
Merged-In: If102677e4cdc4361b5d93283c4d6140dc477a94a
2019-03-01 21:09:26 +00:00
Dongwon Kang
77dbefc0f8 Add rtsp uri test cases for Uri.toSafeString()
Test: atest CtsNetTestCases:android.net.cts.UriTest
Bug: 123669012
Change-Id: I6dac4028fd9eb6b9240a87d9e41f9dafc34bbabe
2019-02-28 16:50:03 -08:00
jungyee.yoo
23be65bee9 Merge "Add sleep to avoid calling stopLocalOnlyHotspot before TetherController initialization." into pie-cts-dev
am: 4d452396c9

Change-Id: Ie10d523bf836e96b246c771cf481e323ed24a3ed
2019-02-27 15:30:14 -08:00
Treehugger Robot
8d9b120318 Merge "Add checks for detailed uid stats" 2019-02-27 21:41:30 +00:00
Luke Huang
e1a851f029 Minor change for jni cts test of asynchronous DNS query API
Test: build
      atest MultinetworkApiTest

Change-Id: I644adb74b841d70bb3396104fb483793a25cd36a
2019-02-27 18:28:21 +08:00
Luke Huang
63a7632799 Cts test cases for asynchronous DNS query API
implement test cases without gtest

Test: build
      atest MultinetworkApiTest

Change-Id: Iacb0b05f449c3a848c62a402cf0fa73d54956245
2019-02-26 16:44:34 +08:00
Luke Huang
f40d0f5739 Build libnativemultinetwork_jni with C++
Test: atest MultinetworkApiTest
Change-Id: If34a89cf00aa06590d947696fc647fc26aa019e8
2019-02-26 16:44:32 +08:00
jungyee.yoo
17ef99be74 Add sleep to avoid calling stopLocalOnlyHotspot before TetherController initialization.
Bug: 123205589
Test: run cts-on-gsi -m  -m CtsNetTestCases -t android.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSingleRequestByApps
Bug: 123379970
Test: run cts-on-gsi -m  -m CtsNetTestCases -t ndroid.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSuccess
Change-Id: I7506c3037dc5368d69330acc47c97c765185870f
2019-02-14 00:18:23 +00:00
Chenbo Feng
ccef9c8093 Add checks for detailed uid stats
Get the detailed network stats for the test uid and check if the detail
stats is consistent with the per uid stats. This test is necessary since
the new devices may get detailed network stats and per uid total stats
from different eBPF maps.

Test: atest TrafficStatsTest
Bug: 79171384
Change-Id: I04533e9fa146e052bdc3787ec6b1f8dad9c19fb7
2019-02-08 12:32:28 -08:00
Luke Huang
714a5fb121 Cts for DnsResolver
Add basic test for DnsResolver

Test: built, flashed, booted
              atest DnsResolverTest

Change-Id: Ibc17bbc5cca6d63174b633854bab2952e57c265a
2019-01-23 17:03:13 +00:00
Luke Huang
5419511192 Merge "Minor changes to the async DNS query API CTS tests." 2019-01-16 10:05:07 +00:00
Benedict Wong
2df0ff2ed7 Merge changes Ide50c715,If9d7e5ef
* changes:
  Add IPsec Tunnel Mode security-check tests
  Add basic functionality tests for IPsec tunnel mode
2019-01-10 22:56:18 +00:00
Luke Huang
b9330ed0a8 Minor changes to the async DNS query API CTS tests.
1. Test that android_res_nresult closes the fd.
2. Use "0" instead of ResNsendFlags(0) since
   the type of flags is changed.

Test: build
      atest CtsNativeNetDnsTestCases

Change-Id: I772fb3f70f52b84802bb352215a1639efeab1629
2019-01-10 21:23:30 +08:00
Treehugger Robot
35a4173f8f Merge "Tag modules for their sim card required" 2019-01-09 16:41:34 +00:00
Luke Huang
c4464a086c More cts test cases for asynchronous DNS query API
Add more cts test case for corner cases.

Test: build
      atest CtsNativeNetDnsTestCases

Change-Id: I8891a4cb40ee788f001a8c2ccf52f2a9574bbd3c
2019-01-08 18:56:17 +08:00
Luke Huang
84d8e36bb7 Add resolver flags to DNS query CTS tests
This is a following commit for cts of asynchronous DNS query API.
Change test path and adjust for the API changing.

Test: build
      atest CtsNativeNetDnsTestCases

Change-Id: I7bc20a4d61293fc1d9e330250455709982639330
2019-01-08 17:27:22 +08:00
Benedict Wong
7e14c0763b Add IPsec Tunnel Mode security-check tests
This change adds tests for the security checks in IpSecService, ensuring
that the MANAGE_IPSEC_TUNNELS appOp is granted before anything can run.

Bug: 115685048
Test: This, passes on aosp_taimen-eng
Change-Id: Ide50c71548847bedbcaa75410b4696ed29404ab5
2018-12-26 17:05:20 -08:00
Benedict Wong
357ed6d3e4 Add basic functionality tests for IPsec tunnel mode
This change adds test for creation and address additions of IPsec tunnel
mode.

Bug: 72458318
Test: Ran on aosp_taimen-eng
Change-Id: If9d7e5ef35d37242d452eb7386cd5f5b80f6351f
2018-12-26 17:04:04 -08:00
Julien Desprez
a5bd44ed53 Tag modules for their sim card required
Test: tf/cts unit tests
./cts-tradefed run cts-dev -m CtsNetTestCases --shard-count 2 (with and
without sim card)
./cts-tradefed run cts-dev -m CtsCarrierApiTestCases --shard-count 2
(with and without uicc sim card)
Bug: 69367250

Change-Id: Iea26d1ea7528544aa39193adbec51418b1b35a86
Merged-In: Idcd35b9345be32658a1fd44027b03e5a47ff7e88
2018-12-17 20:46:16 +00:00
Paul Duffin
7131af6b93 Add tests for InetAddresses.parseNumericAddress()
Test: run cts -m CtsNetTestCases
Bug: 78686891
Change-Id: I1e121ab3fd619964625c4b51e0b7280eef001775
2018-12-17 15:46:26 +00:00
Luke Huang
3c5f35a38e Test for asynchronous DNS query API
Add basic test for asynchronous DNS query API

Test: build
      atest CtsNativeNetDnsTestCases

Change-Id: Ib757ba8f0128d3efe7dfbcbfb45d36e4350834f9
2018-12-12 04:18:07 +08:00
Tony Huang
c1ba8dd9ac Add test for Uri.toSafeString
Due to exposing api of toSafeString, add coresponding testing
for it.

Bug: 119153962
Test: atest UriTest
Change-Id: I156b2b03ee9c1d4a05ac635b4f684c5b4dcfca08
2018-11-09 14:23:31 +08:00
Chalard Jean
2a41b1cdda Add Uri tests for IPv6 literal adresses
Bug: 25540738
Test: this
Change-Id: Id63a5dd17293014218df78bcb440993cc5f3beb8
2018-10-19 08:56:18 +00:00
Neil Fuller
0b72fa9cfe Remove explicit dependency on conscrypt
The dependency is unnecessary as by default conscrypt
is included in the "standard libraries".

Test: build
Bug: 113148576
Change-Id: I30d68049215c61931bdd7aa5e2a0f125e6d1bf90
2018-10-11 16:11:37 +01:00
Jeff Vander Stoep
ff39f3fa71 Move tests requiring /proc/sys/net access to hostside
This access is going away for apps. Move these tests to hostside
tests to be executed by the shell domain.

Test: atest cts/hostsidetests/net/src/com/android/cts/net/ProcNetTest.java
Test: atest android.net.cts.ConnectivityManagerTest
Test: atest android.net.cts.IpSecSysctlTest
Test: atest android.net.cts.MultinetworkSysctlTest
Bug: 116053204
Change-Id: Id7e867184dd344a2d877515956e76019d627788b
2018-09-28 10:29:01 -07: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
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
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