If client knows network name and passphrase, it can connect to the
server (Group owner) without user interaction. In this case, it needs
to use interface address of group owner, not device address
Bug: 408245757
Test: atest CtsConnectivityMultiDevicesTestCases
Flag: EXEMPT bug fix
Change-Id: I47bc8609e63564f4226a4ef71ea9e382f5f919fe
Signed-off-by: Rohit Kothari <r.kothari@samsung.corp-partner.google.com>
Rohit Kothariauthored and Paul Hucommited 2025-05-07 02:47:38 -07:00
Network name for Wi-Fi Direct group must starts with the prefix DIRECT-xy.
But CTS sometimes makes name with non-character in the position of “xy”.
To prevent issue, network name needs to be generated with the prefix DIRECT-xy.
Bug: 408245757
Test: atest CtsConnectivityMultiDevicesTestCases
Flag: EXEMPT bug fix
Change-Id: Ida07616b920b32dadd76f732ff2d87cc6ecc960d
Signed-off-by: Rohit Kothari <r.kothari@samsung.corp-partner.google.com>
Rohit Kothariauthored and Paul Hucommited 2025-05-07 00:34:24 -07:00
This commit removes the test_igmpv3_general_query_offload() test
logic. This test fails on user builds because they run on non-rootable
devices, preventing the necessary test operations.
Additionally, the APF counter check logic is removed as it was causing
test flakiness and instability.
Bug: 406570694
Test: TH
Flag: EXEMPT test only change
Change-Id: I9f2f32c49737721e537d578d6df41d4062d0684f
This commit enhances the stability of the APFv{4,6} multi-device tests by addressing several sources of flakiness and improving the test setup and validation.
Specifically, this commit:
* Increased sleep time in the test setup. This ensures APF is activated before each test, preventing unexpected behavior.
* Added sleep time in `ApfV4Test` to ensure APF remains enabled and is not disabled due to high throughput scenarios.
* Changed the validation order to first check received packets and then APF counters. This helps to more easily identify the root cause of test failures.
* Changed the Ethernet destination address from multicast to unicast in `ApfV6Test` to prevent packets from being filtered due to DTIM skip.
* Removed the `test_broadcast_arp_request_offload()` test, which was flaky due to DTIM skip and is adequately covered by the `test_unicast_arp_request_offload()` test.
Bug: 406570694
Flag: TEST_ONLY
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV4Test
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test
Test: run cts -m CtsConnectivityMultiDevicesTestCases --skip-preconditions -t ApfV4Test --shard-count 2
Test: run cts -m CtsConnectivityMultiDevicesTestCases --skip-preconditions -t ApfV6Test --shard-count 2
Change-Id: I053509459078d0bd94e16a6bf7349b948f930e6c
Jimi Chenauthored and Yuyang Huangcommited 2025-04-02 04:31:01 -07:00
This reverts commit 372a15220a.
Reason for revert: this is Android B+ CTS and shouldn't be run with previous release, this can help to catch human error.
Change-Id: I867c63511d4f640e07b8317506291de284efcef3
CTS tests screen-on device in the beginning, but APF is not activated after screen-off in the test setup.
This change adds 3 secs delay to ensure APF activation before test execution.
Bug: 402667362
Test: ./cts-tradefed run cts-on-gsi -m CtsConnectivityMultiDevicesTestCases -t ApfV4Test --shard-count 2
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV4Test
Change-Id: I067ce792b5f89e2f0051933982ebc734607fbf98
The 'ip link show' requires root permissions, causing errors.
This change replaces 'ip link show' with 'ip link'.
Bug: 401123634
Test: atest NetworkStaticLibHostPythonTests
Change-Id: I82b219ae9179f23e3233f797aeb4aa3740e6d3ec
Currently, upstream network validation is always required, even
for type None. This is unnecessary for APF and mDNS tests, as
they can be executed on local networks. Additionally, some
devices lack the ability to perform network validation when the
hotspot is enabled due to hardware limitations. Therefore, remove
the validation check for upstream type None.
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest
Bug: 335368434
Bug: 396551848
Change-Id: If2a96cf9d62e37fc27be6193f9ce9b9cfc8613df
Junyu Laiauthored and Paul Hucommited 2025-02-17 21:22:19 -08:00
Some tests may disable wifi when testing, for example,
tests which setup cellular default network.
Reconnect to wifi to prevent from flaky.
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest
Bug: N/A
Change-Id: Ic0e27efc0e82698618c651c0a78b000c0ffe2131
Instead of using recursive search in test directories to find
ConnectivityTestPreparer.apk, only search for it in the dependencies of
net-tests-utils-host-common.
The default strategy for finding test files is to do a recursive search
in test directories, which may find wrong files in wrong directories.
In particular, if some MTS test includes the checker APK, and that test
is linked to a module that boards the train at a version different from
this target preparer, there could be a version difference between the
APK and the host-side preparer.
Follow-up changes will remove ConnectivityTestPreparer.apk from the
dependencies of each test case so it does not appear multiple times in
test suites like android-mts.zip, but this change makes the process
more deterministic.
Test: mts-tradefed run mts-dev -m CtsTetheringTest
Bug: 377716515
Change-Id: I3b00ef9a0bd1d29e8734f44413be4ff16879c574
24Q2 reconnects mobile data when Wi-Fi is toggled when IWLAN is used,
which breaks multinetwork tests. Disable IWLAN as a workaround on such
builds.
Bug: 368477391
Test: atest
Change-Id: Ia5748dc2378c5fc4a43ff83e6b47e629eb8bf77a
The `send_packet_and_expect_reply_received` start capurting packets,
and then send out request packets, then get expected packets counts to validate.
In the end, stop capturing for the specified interface.
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: I275534a45ce0ed363fa8ab9d12272d25845aa598
This commit introduces checks for APF version, VSR API level,
and Android version to decide whether an APFv4 test should be
run, skipped, or fail:
* If Android version is less than V, skip the test
* If VSR API level is greater than or equal to 14 and APF
version is less than 4, fail the test
* Otherwise, if APF version is less than 4, skip the test
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest
Fix: 352132428
Change-Id: I023164fb59ad40f489abea2e0c45761efc39699b
This is a no-op refactoring, which is preparation for follow-up
changes to add more apf tests.
This includes:
1. Add a method to send packet and expect counter increases.
2. Inline the packet construction code in the test method.
Test: atest NetworkStaticLibHostPythonTests
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases
Bug: 350880989
Change-Id: Iadcfd97740033306af1b6a474004cbf0699ddd1b
This is a no-op refactoring, which is preparation for follow-up
changes to add more apf test classes.
This includes:
1. Move initialization code to a base class, which setup a hotspot
and a client connects to it, and enable doze mode to
activate the apf.
2. Check whether send raw packet is supported before testing.
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases
Test: atest NetworkStaticLibHostPythonTests
Bug: 350880989
Change-Id: I6376935883653182728e473e2f5533407d993d7b
This is a no-op refactoring, which is preparation for follow-up
changes to add more apfv4 tests.
This includes:
1. Add a entry point for multi-device tests to collect
test cases from different files.
2. Move multi-device initialization code to a base class.
3. Make different test classes inherit the base class.
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases
Bug: 350880989
Change-Id: I294c85d8e09633bbf02ba1543b9f2ea3e988e20d
The mDNS test should be conducted with an SDK version higher
than Android T (align with NsdManagerTest CTS, as NsdManager is
only updatable on T+). Add an SDK version precondition check to
ensure both devices are available for testing.
Bug: 343311941
Test: atest CtsConnectivityMultiDevicesTestCases
Change-Id: Id5505b5d0746515689dc1646116a16fcfb8ece64
This utility reads output of cmd network_stack apf ${iface_name}
capabilities. This is needed for the tests to skip if the apf
version is too old.
Test: atest NetworkStaticLibHostPythonTests
Bug: 352132428
Change-Id: I1f8b523c3e6f687c2e919993bc18392dc25dbbf7
This is now derived from the passed packet data by
NetworkStack.
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest
Test: atest NetworkStaticLibHostPythonTests
Bug: 335368434
Change-Id: Ida06c00e6f499b782cb903c9fa0a4154c2d8cf84
This commit includes several new functions to support sending custom
raw Ethernet packets. This includes methods for retrieving
MAC addresses, sending empty EtherCAT packets, and sending
arbitrary raw packets with specified types and destinations.
These functions are primarily intended for testing purposes
and rely on the `send-raw-packet-downstream` command provided
by NetworkStack.
Test: atest NetworkStaticLibHostPythonTests
Bug: 335368434
Change-Id: Iae7879bf92e1dda8fbd32b92ff166e82c87593c7
This commit adds the necessary code for 'adb_utils' to enable APF
multi-device testing which will be introduced in follow-up patches.
This includes utilities of issuing shell command, parsing dumpsys
key-value pairs, controlling doze mode and screen state.
Additionally, unit tests are added to verify the basic functionality.
Test: atest NetworkStaticLibHostPythonTests
Bug: 335368434
Change-Id: I580e91b494580ec9105c8988972845d38c104031