Commit Graph

20 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Chenbo Feng
0f27294a76 Merge "Check kernel version before running qtaguid test" am: 3b38b58b1f am: 6563bb9f75
am: 9e998c4312

Change-Id: I448478ec089c6fd9676ca3b034d8bc8c5ddad23b
2018-01-11 21:43:27 +00:00
Chenbo Feng
3a9e2dc232 Check kernel version before running qtaguid test
The qtaguid module is required for devices running kernel earlier then
4.9, but is no longer avaliable after that. Add a check before running
the kernel qtaguid native test so it doesn't fail on new devices.

Bug: 30950746
Test: run cts -m CtsNativeNetTestCases
Change-Id: I32bc77a4c51d8b64ac1a5411c75c56a51b84ea77
2018-01-11 11:15:06 -08:00
jdesprez
607948bfb0 Add cts suite tag to all CTS modules
Test: build
Bug: 65303193
Change-Id: I064459de5d4f8e958f41ac238cad35e5f7e99d3a
2017-12-16 04:19:31 -08:00
nickrose
02fa5a5648 Add all CTS tests to VTS, to improve VTS coverage.
b/62423436.

This CL was generated using the following command:
master/cts$ grep -rl "LOCAL_COMPATIBILITY_SUITE := cts" . | \
xargs sed -i \
's/LOCAL_COMPATIBILITY_SUITE := cts/LOCAL_COMPATIBILITY_SUITE := cts vts/g'

Based on change: d98ea4bc2a

Test: make vts -j32
Verified VTS output contained the CTS test case source code.

Change-Id: Id52ac1639447276171006c33bdfa7b4e6c874745
2017-07-07 12:28:36 -07:00
Chenbo Feng
b2b907c114 Merge "Add test to check sock addr in qtaguid ctrl file" am: 7f67f4521d am: 338fcfc742
am: 2738390adb

Change-Id: I6bdae98d42f3f04f06b59136897d097d74c7cfcd
2017-06-19 07:35:41 +00:00
Chenbo Feng
da811bd336 Merge "Rename the native test file" am: 8867b298c4 am: 1f4f36b2af
am: b9591b1a27

Change-Id: I026e6e406d4b731e910035de2b75830b75d2d520
2017-06-19 06:17:06 +00:00
Chenbo Feng
074684af96 Add test to check sock addr in qtaguid ctrl file
This test verifies the socket address information is not leaked by
xt_qtaguid module inside the kernel. The sock_addr parsed from
proc/net/xt_qtaguid/ctrl file should always be 0

Bug: 62489688
Test: in cts-tf: run cts --module CtsNativeNetTestCases

Change-Id: Ie9ed8aa604be7c6ae364baa69922b89c006dea72
2017-06-18 21:52:02 -07:00
Chenbo Feng
a9dabfefc8 Rename the native test file
Since more test is added to the qtaguid native test file, the previous
name is not suitable for representing the purpose of this test file.
Rename it to NativeQtaguidTest.cpp.

Bug: 62489688
Test: in cts-tf: run cts --module CtsNativeNetTestCases
Change-Id: Id64591db060c7d0178602517fd703dab586bfb5f
2017-06-18 20:30:51 -07:00
Guang Zhu
dd8918c80b add component metadata to all CTS module configs
Bug: 36140955
Bug: 35360169
Test: new unit test to ensure that all modules have this field
Change-Id: Id856f93c0d2a018be65bff33459b4b703d23257d
2017-06-05 16:15:37 -07:00
Chenbo Feng
bc0e94a4a3 Native test for qtaguid module
Add a native test to check the qtaguid module nolonger hold the fd of a
closed socket. The test does not work in java because android framework
will force untag the socket before closing it.

Bug: 36374484
Test: run this test as CTS test and all devices should pass
Signed-off-by: Chenbo Feng <fengc@google.com>
Change-Id: I9e015d412d1aec10d843dfee4b480169d1f6ff8e
2017-05-15 23:16:35 -07:00