This is necessary to pass tests whatever the values of the features are.
NetworkAgentTest was updated assuming the feature was true, so
this patch revives the old code for when it's false.
TestableNetworkAgent reads the feature directly from
ConnectivityManager when it's not mocked.
Test: CtsNetTestCases
Change-Id: Ia556fbb1d1b6a38a4995b021981e2693d778bfff
CarrierConfigRule#setHoldCarrierPrivilege will try to acquire/drop the
carrier privilege, but does not wait for the result of the operation. If
a test immediately calls an API that requires carrier privilege before
the operation completes, then it will fail.
Fix this by waiting for the operation to succeed before returning.
Bug: 295979433
Test: presubmit
Change-Id: Ic7cc9e1dbc206fbc0c3b79058b5782d93e89f1d7
Quang Anh Luongcommited 2025-03-21 18:13:37 +09: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
Additionally, when calling isEthernet(null), throw NPE instead of
SIGSEGV.
Test: New test in this patch
Change-Id: Ie80b860d4befe65a1777d0ebeb18d1807c6375d0
Chalard Jeanauthored and Patrick Rohrcommited 2025-03-19 08:24:45 -07:00
Now that the system server has a queue doing this job,
the queue on the network agent side can be removed.
Test: ConnectivityCoverageTests, CtsNetTestCases
Change-Id: Idf0435f447cfdd28d829a867d1085771837c6f9b
This change corrects a missing function error, which was renamed in aosp/3545962.
Test: atest NetworkStaticLibHostPythonTests
Change-Id: I2f51702adfa48f2207ef4dd79f641c8f57d15ac7
Move the existing helper methods to acquire carrier privileges in
NetworkAgentTest.kt to CarrierConfigRule where it can be reused by other
CTS tests. Also reset the carrier service package override in the rule
cleanup.
Bug: 216524590
Test: atest NetworkAgentTest
Change-Id: Id907a2d641aa61838119e2be65654b9796464498
Quang Anh Luongcommited 2025-03-18 13:05:01 +09:00
Because some APIs in RealtimeScheduler are higher than the min
SDK version for the standalone MDNS build, an abstract class is
required to allow the standalone MDNS build to pass.
Bug: 366373064
Test: atest FrameworksNetTests NsdManagerTest
m service-connectivity-mdns-standalone-build-test
Change-Id: I0b3ac7b4f8dfceeb3dd81e6a5f368b5d57927c41
This rtnl message is used with sendOneShotKernelMessage() which expects
that kernel returns an ACK. We need to set NLM_F_ACK explicitly for
that.
Bug: 379021505
Test: Manually run and no more exception with EAGAIN.
Change-Id: Iba21fedf60f5eca63eceee9362e252952bb805c1
Currently ConnectivityDiagnosticsCollector invokes tcpdump with -U,
which would causes the collector failed to log ending packets due to
packet buffering.
Test:
android.net.cts.TrafficStatsTest#testTrafficStatsForLocalhost
Bug: 393471251
Change-Id: Ibe2977097bdeeef9546ce9c83b1dfd695c31f6d1
Mockito extended tends to cause all kinds of issues due to the way it
injects itself into the bytecode of framework classes instead of
creating subclasses.
Use non-extended mockito as it is not actually necessary for current
tests.
Test: atest
Change-Id: Id2874309cce2778c4405b852df9a3ae816c4abcb
This is a no-op refactoring which inline the functionalities
to IpServer, enabling subsequent changes to move
networkAddInterface part to ConnectivityService when the
tethering is enabled.
Test: atest TetheringTests:android.net.ip.IpServerTest
atest NetdStaticLibTests:com.android.net.module.util.NetdUtilsTest
Bug: 349487600
Change-Id: I6d0e5d349691df7a15bee852d5fd1dd19f5da6f6
This is a no-op, preparatory refactoring to isolate route
modification functionality, enabling subsequent changes to move
routing control to ConnectivityService.
Test: atest TetheringTests:android.net.ip.IpServerTest
atest NetdStaticLibTests:com.android.net.module.util.NetdUtilsTest
Bug: 349487600
Change-Id: I55af07968567b173dd9f97795600390439f1b927
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
This reverts commit a481dc184f.
Reason for revert: Update this change to ensure proper closure of the timerfd object.
Change-Id: I14530ba77a39c77b4c7af6855ec77ba4907ab9f9
This reverts commit 3eec0163fc.
Reason for revert: Failures in b/399299587 are flakes and not related
Original message:
Allow adding output from any shell command to the test diagnostics file,
instead of just dumpsys.
This introduces a new ShellUtil that can also help run more complex
commands, with pipes and redirects or as root for example.
Bug: 317602748
Test: atest with tests using this util
Change-Id: I609469864dfa5d520c055b648f9cac2f4443c5c6
Remi NGUYEN VANauthored and Gerrit Code Reviewcommited 2025-03-04 02:54:50 -08:00