Map status dump will do access check if map is null.
This could show different message from the current dump output.
Information in map content dump does not change
$ dumpsys connectivity trafficcontroller
....
mCookieTagMap:
cookie=1398 tag=0x0 uid=1029
cookie=1433 tag=0xffffff82 uid=1051
cookie=1166 tag=0xfffffe01 uid=1073
$ dumpsys netstats
....
mCookieTagMap:
cookie=1144 tag=0xfffffe01 uid=1073
cookie=1376 tag=0x0 uid=1029
cookie=1408 tag=0xffffff82 uid=1051
Bug: 217624062
Test: dumpsys netstats, dumpstate, atest NetworkStatsServiceTest
Change-Id: I14dd6f969a0b5eb24ace62361ce2484cf18b7470
* changes:
Make all ConnectivityService#doTestXyz methods private.
Expect creating the DNS event listener in setUp, not in tests.
Rename testPreferenceForUserNetworkUpDownForGivenPreference.
This simplifies the code a bit.
Also remove an unnecessary reset(mMockNetd) call.
Bug: 143158421
Test: test-only change
Change-Id: Ie49d23193ef8d9dcb3f724a7dff249755c67a971
This method name is confusing because it is not a test, and
convention in this file is that only test methods are called
testXyz. Rename it to doTestXyz.
Bug: 143158421
Test: test-only change
Change-Id: Ief9742174a7fc9966ade29d9a32a13277ce747ac
If the notification shade was swiped down, the activity that
this test wants to verify will be behind the notification
shade, and this causes the test failed. Thus, this change
makes the screen back to home before starting the test to
avoid the activity being hidden by the notification shade.
Bug: 240891836
Test: NetworkNotificationManagerTest#testNotifyNoInternetAsDialogWhenHighPriority
Change-Id: I4d903d2623c462fca4ec07eb0a0231ef527a200b
All devices shipped with S+ release would have 4.9+ kernel
with bpf enabled. And for older devices qtag uid is
already broken for a long time. Hence, it is safe to
remove the related code.
Bug: 234315786
Test: atest FrameworksNetTests CtsNetTestCases \
ConnectivityCoverageTests
Change-Id: Id2a6bfdf32793e5f48eb74da3b662906e5ed380e
This patch changes the way of mocking samples in the tests, and
enabling use bpf stats flag, testing through the code path
that is not running in the production code does not make any
sense.
This change also copied methods from NetworkStatsFactory
as we want to continue parsing the golden files to test the
464xlat adjustment which historically has been prone to errors.
And deleting tests that does not execrise NetworkStatsFactory
code or rely on monotonic accumulative readings from native
layer, which is not happening today.
Bug: 234315786
Test: atest FrameworksNetTests CtsNetTestCases \
ConnectivityCoverageTests
Change-Id: I5cab2b78651f1da628705c191e42857c8b59d826
Following CLs will switch previous codepath (JNI) and new codepath
(Java) for bpf map operations based on this flag.
Bug: 217624062
Test: atest BpfNetMapsTest
Change-Id: I74f10d5c97390993acea110f6528ef8980bb2aa4
Add back compat config for RUN_NATIVE_NSD_ONLY_IF_LEGACY_APPS, which was
lost when moving NsdManager to framework-connectivity-t.
This causes NsdManager to start mdnsresponder again when used by apps
with target SDK < 31.
The change also changes the compat ID used, to make sure it does not
conflict with the ID already in use in S and below, when the module is
installed on such a platform. This is the only ChangeId used by
framework-t.
Also add a CtsNetTestCasesMaxTargetSdk30 test to verify that behavior.
Bug: 235355681
Test: atest CtsNetTestCasesMaxTargetSdk30
Change-Id: I7ca6051d0a4ba5aff3e44bece2cbac22eb1be32d
Changing multiple instances where the assert order for an assert.equals
was (actual, expected) to the more widely (and suggested) ordering of
(expected, actual).
Bug: 235605892
Test: atest FrameworksNetTests
:com.android.server.ethernet.EthernetNetworkFactoryTest
Change-Id: I6e9459d34d6cc7f43a2bfe346d2c2ca9551d46da
Use new Builder API which was introduced in Android T.
Bug: 238843364
Test: FrameworksNetTests
dumpsys netstats --checkin and check the output
Change-Id: Ieb0a2ee04056a1cedb71274ea710ff5153e2d68c
Tag socket as uid AID_CLAT to avoid duplicated data usage counting by
bpf program.
Bug: 237369591
Test: ClatCoordinatorTest
Change-Id: Ic18521b63b3feadd53d77d7f4f0b44ab983e5fbf
Fix so callbacks are sent when changing the interface link state for an
ethernet interface from down -> up.
Bug: 235605892
Test: atest FrameworksNetTests
:com.android.server.ethernet.EthernetNetworkFactoryTest
Change-Id: If13254d4882aa2f0021f6443f31ef173b3867727
This is a no-op and test only change. Test the scenarios below:
- Registration service successful and failed.
- Discovery service failed.
- Resolution service failed.
- Getting an address failed.
Bug: 236788977
Test: atest FrameworksNetTests
Change-Id: I533d0be2abfa5c1832a060b4b2d4d1dd382c5b71
Use Builder API which was provided in Android T to
build a template.
Bug: 238843364
Test: build, FrameworksNetTests:NetworkStatsManagerTest
Change-Id: Ibf1ac16541d6f3ddaf9b241e2f47ae04acbedf93
unregisterNetworkOffer() does not execute synchronously, so it is
possible that NetworkOffer callbacks are received after the offer was
unregistered.
Test: atest EthernetManagerTest && atest EthernetNetworkFactoryTest
Bug: 171872016
Change-Id: I2c50b01176e4968c31f83148f1831b55f8b06908
This is a no-op and test only change. Some parameters use many
times, so add common parameters to reduce duplicated code.
Bug: 236788977
Test: atest FrameworksNetTests
Change-Id: I94370817ea87d1da5c30ea2ed467c1746edecba3
This commit is a preparation for replacing JNI codes that modify
UidOwnerMap by Java.
Bug: 217624062
Test: atest BpfNetMapsTest HostsideRestrictBackgroundNetworkTests
android.net.cts.ConnectivityManagerTest#testFirewallBlocking
Change-Id: Ie595cf1f77a3ed86addbcdaea1a1be972e0265b3