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 introduces the use of VirtualEnv to manage test
dependencies. Specifically:
1. `PythonVirtualenvPreparer` is invoked before running tests
to set up the isolated Python environment.
2. The test is declared as a `MoblyBinaryHostTest` to enable
VirtualEnv compatibility, as `PythonBinaryHostTest` lacks
this support.
3. The Mobly test runner is invoked manually to accommodate
multiple test classes, which is not supported by
`mobly.test_runner.main()`.
4. Test classes are refactored to inherit from
`mobly.BaseTestClass` for compatibility with the Mobly
test runner.
This change is a prerequisite for subsequent commits that will
install libraries via `pip install`, facilitating isolated
dependency management for improved test reliability and
maintainability.
Also, this commit uses parameterized annotation from absl
to rewrite several tests as paremeterized tests.
Test: atest NetworkStaticLibHostPythonTests
Bug: 335368434
Change-Id: Iffa2f8fa81c3913f3e08cca01b2c009ca959db73
These tests are run as part of the MTS suite, setting min_sdk_version
ensures that these tests can be installed on an older device and test
the corresponding mainline module.
Test: atest [<mod_name>...]
Bug: 156476221
Change-Id: Ic94b00ee1818063fc9f13e4ecffaca88f58c30c3
Calling setIncludeTestInterfaces(false) in tearDown() is not needed as super.tearDown() already takes care of it. In addition, the parent class's tearDown method also checks whether ethernet is supported and the tests actually ran. Leaving the setIncludeTestInterfaces(true) in setup is fine, as super.setUp() fails with an assumption violation if ethernet is not supported.
Note that this is a bit of a hack. NsdManagerDownstreamTetheringTest should not use EthernetTetheringTestBase as a base class (and EthernetTetheringTestBase should be deleted).
Change-Id: Ie1557250166fbf30c98e87dc2ffb4c3e001be167
Test: TH
Bug: 341063340
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
Added a CTS test case to verify APFv6 implementation by sending an
ICMPv6 ping request with a 56-byte payload. The reply was expected to be
dropped by the APF program. The APF program was expected to sent another
ICMPv6 ping request with a 1-byte payload. The reply was expected to be
accepted by the APF program. Finally, The test confirms if the second
ping reply is received.
Test: TH
Change-Id: I322e7c0674ac9df60579d9e6d44690e383004d36
This is a no-op refactoring.
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases
Bug: 335368434
Change-Id: I415cc22f49c437be6fe8e8ae8822af22ebefe8d1
bpfLock() does nothing on 4.9 as it relies on bpfGetFdMapId which is not available until 4.14.
Change-Id: Ib737db61a5d8fb39bcbbe1bb5937afb0c63bd1d1
Test: TH
Bug: 349034378
Address review comment on aosp/3027487
This CL also adds test for enforceMeteredApnPolicy
Test: CSBlockedReasonsTest
Bug: 344800107
Change-Id: Ib531bf5b34566fc91fec9f977c5257b332189706
This reverts commit I93b8b94dcad8f2bc4d022314372fb97109ed8f2f.
Reason for revert: ClatIngress6Value and ClatEgress4Value are written to by the clatd.c program (reference aosp/3002596). Due to this, SingleWriterBpfMap is unsuitable in this scenario, as it can only be used when no BPF program ever writes to the map.
Change-Id: I382bbfc8554391c6c83a39bbea155114202b71a8
This commit fills in the ticks of active timestamp of randomly generated
dataset as defined in Thread spec.
Bug: 347838683
Change-Id: I5d8ba3ca7728e1890996fdd64198f7bc90bfb1fa
Replace TetheringRequestParcel with TetheringRequest in the service
code. This makes future changes easier since TetheringRequest is a
proper class and not an AIDL object.
Bug: 216524590
Test: atest TetheringTest TetheringManagerTest
Change-Id: I0cdee597d393e53feb9fe9aff4d6c67330c88599
Quang Anh Luongcommited 2024-06-26 16:25:13 +09:00
Most users of NetworkCallback do not override all methods, so callbacks
from ConnectivityService end up being unused by the app.
To save resources, check which callback methods are overridden in
ConnectivityManager, and inform ConnectivityService so it can skip
preparing and sending the corresponding binder calls when the callback
is not used by the app.
This is flagged off by default.
Test: flag enabled: atest CtsNetTestCases ConnectivityCoverageTests
Bug: 327038794
Bug: 279392981
Change-Id: Iaf490f416fb6e1437d40497fba1a40a899a9f523
Arm-only because the 32 bit userspace vs 64-bit kernel
issues are worse on x86 because of some extra 4 vs 8 byte
alignment (when included in structs) ABI issues.
Wear is unlikely to ever run on comparatively high
power usage x86 cpus, so this should be fine.
Manually tested by adding:
if (isWear()) ALOGI("Wear!");
and additionally logging 'bool watch' within isWear()
on 'cf_gwear_x86-trunk_staging-userdebug'.
Resulting output:
I NetBpfLoad: NetBpfLoad v0.46 (/apex/com.android.tethering/bin/netbpfload) api:35/36 kver:601004b (32-on-x86-64) uid:0 rc:01
I NetBpfLoad: isWear(ro.cw_build.wear_sdk.version=6[6] ro.build.characteristics='nosdcard,watch'[1]): true
I NetBpfLoad: Wear!
Bug: 346252668
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9b2a3b88095264245935950bd1a7dfbb5293334b
Maciej Żenczykowskicommited 2024-06-25 10:39:43 +00:00
The check is_system_uid should mirror the definition of core_uids in
UserHandle.isCore until it is available to be read from mainline code.
isUidNetworkingBlocked should also do the same.
Test: All existing tests should pass.
Test: atest CtsHostsideNetworkPolicyTests
Test: atest FrameworksNetTests
Bug: 348316140
Change-Id: Id5e01289b301a725b162ef249062e0f2806876dc
Introduced a test case to verify the correct incrementing of the
FILTER_AGE_16384THS counter when using the APFv6 interpreter.
Test: TH
Change-Id: Idbb31580d6489865c05e4a35760f1ea26f779f17
* changes:
[Thread] support ThreadConfiguration API at ThreadNetworkControllerService
[Thread] add support for configuration at ThreadNetworkController
Treehugger Robotauthored and Gerrit Code Reviewcommited 2024-06-24 10:03:18 +00:00
This CL adds methods for setting the ThreadConfiguration and
subscribing/unsubscribing to Configuration changes. The ThreadConfiguration
is used for controlling Thread features for the device.
Bug: 342519412
Change-Id: I9e20391eb3b2f20312a2cb0b587cc5bdf200d24d
Add tests to verify mdns advertising, discovery, and resolution
over a hotspot connection using multiple devices.
Bug: 343311941
Test: atest CtsConnectivityMultiDevicesTestCases
Change-Id: I9f52a271385cddc12c8f57b188e080ad69651f9f
This CL updates the javadoc for NsdServiceInfo to make it clearer that a client must contain all the desired address records for the hostname, and all the other registrations must not have any address records for the same hostname.
Bug: 344799768
Test: None
Change-Id: I8eea39adf870a75de23bcafaf8e13d78ee330da4