This causes failures in subsequent tests that expect
only one test network to be up.
Bug: 181033598
Test: this
Change-Id: I74444f4aff7750a5bbd2564e5e22714d73c72d8b
A caller can mostly already do this via forEach(), but having a
specific method is faster (since the code does not need to read
the value) and easier to use.
The semantics of this method (e.g., ignore ENOENT while deleting
a key, but throw on any other error) match those of the native
BpfMap::clear method.
Test: new unit tests
Change-Id: I5cd32efd0f87c823cd2d0a2fa3a95a83093fb6f9
In AOSP master and downstream branches, this likely works via a
transitive dependency. In mainline-prod, this doesn't work. Add
the dependency explicitly, since it makes things build everywhere
and in general it's also good practice to "include what you use".
Bug: 167645754
Test: m CtsNetTestCasesLatestSdk in mainline-prod has fewer errors
Change-Id: Ie575372415a806deee9996aab7f920d2c15bff80
By the new feature introduced in next Android release.
Any PendingIntent needs to be specified about the mutability.
While ConnectivityService would put extra info such as
network or request id before broadcasting the inner intent.
The MUTABLE flag needs to be added accordingly.
Test: this
Fix: 178121691
Change-Id: I87d0efaf51a91556ef9f8e18db38803e4861cfd7
The test failed since the API is not available on R device.
Add conditions to ignore it.
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.ConnectivityManagerTest
Bug: None
Change-Id: I3cbc623a84f7313e1155fe83a44ebef042a04076
The asserted capabilities change callback event took 170ms
in average to fire on cuttlefish, which causes 35% of
flakiness since the event might delay up to 500ms in practice.
Extend to 30s timeout value which is the standard value
of waiting for network callback events in CTS.
This change also ignore the test up to Android R since the API
is not available for R devices or below.
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest#testRequestBackgroundNetwork \
--rerun-until-failure 500
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.ConnectivityManagerTest
on R device
Bug: 179694867
Change-Id: Ic5e11d4a4f326150848bc48038fa01cde39f7661
This is a re-upload that combines aosp/1550755 and aosp/1579872.
Test: atest NetworkRequestTest#testBypassingVcnForNonInternetRequest
Test: atest CtsNetTestCasesLatestSdk on R device
Bug: 175662146
Change-Id: I2fdc2418339bef30c9f816d63418bba218abf4a1
We already run these tests when platform code affecting these tests
change. Now enabling these too to also run when these tests are being
changed.
Fixes: 154344933
Test: atest --test-mapping packages/modules/Connectivity/tests/cts/hostside
Change-Id: Ie3ea67670ccd028815936d30189146c25ba87e28
The test did not verify that mobile networks were validated before
starting, which could cause them to validate during the test and pick up
the test URLs. Verify that mobile data is validated before the test.
Also shorten test URL expiration, so in case of hard-interrupt of the
test (without calling tearDown) it does not affect other tests for a
long time.
Bug: 178630586
Test: atest CtsNetTestCases
Change-Id: I03f346bcc231f869f50ca9c7e84bfac319bcc871
because it is not appropriate for use in XDP programs
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibd5dac9676bae7aa5f10fbcfd777291f72bec819
and more importantly unconditionally. This requires less effort
on the part of the in-kernel bpf verifier.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibaa94bf096fc81c4d984dfabf515131b1c81ef09
Currently, this is the default so this is a no-op,
But the default is changing to true.
Bug: 180375550
Test: Treehugger
Change-Id: Ib841e474ab2b2ff2b54c160bb06c3bbbeea92675
We've backported the necessary support to all 4.14+ ACK kernels,
but we can't actually enforce that these changes will be picked
up by all devices. Thus we can only make the full featured
implementations optional on [4.14..5.8) kernels, with a tcp-only
version for those 4.14+ devices where the full featured version
fails to load.
Note: there's still a fair bit of implementation work left
in the do_forward4() function itself. This is really just
the skeleton.
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If78123e00d55a77f2ecd7da1547581797e23f9b2
This will facilitate providing a tcp-only version of the programs
which due to TCP's very long timeouts will not need to use the
Linux 5.8+ bpf_ktime_get_boot_ns() helpers.
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1e49b6758d3754782ac6f8820e0c15aa20e4c61d
As this is the actual version that is required,
ie. the version that supports bpf_ktime_get_boot_ns() helper.
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2ea4830597a0bed53950a5d0c483a47208959f35
Revert "[VCN07] Bypass VCN for non-internet app accessible cellu..."
Revert submission 1579872-vcn07
Reason for revert: Possible culprit for b/179768816, broken ConnectivityControllerTest
Reverted Changes:
Id09b19c13:Address comments on aosp/1550755
I245bd69e0:[VCN07.1] Add test for bypassing VCN for non-inter...
I9936894b9:[VCN07] Bypass VCN for non-internet app accessible...
Change-Id: I7902a221c8597427e48d3e32fa5668b9c1a47420
Revert "[VCN07] Bypass VCN for non-internet app accessible cellu..."
Revert submission 1579872-vcn07
Reason for revert: Possible culprit for b/179768816, broken ConnectivityControllerTest
Reverted Changes:
Id09b19c13:Address comments on aosp/1550755
I245bd69e0:[VCN07.1] Add test for bypassing VCN for non-inter...
I9936894b9:[VCN07] Bypass VCN for non-internet app accessible...
Change-Id: I3fded28691e05a3dbf25bb7361c72acaa61b29c7
SubscriptionManager.setSubscriptionOverrideUnmetered() has been updated
to add NET_CAPABILITY_TEMPORARILY_NOT_METERED instead of
NET_CAPABILITY_NOT_METERED. So, we can't rely on that for changing the
meteredness.
Bug: 179664982
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideNetworkCallbackTests.java
Change-Id: I4163b2f9c6f80b4e639d9977ef7e2b444ab12e81
Merged-In: I4163b2f9c6f80b4e639d9977ef7e2b444ab12e81
This method does not behave correctly when wifi is connected but
the last CONNECTIVITY_ACTION broadcast was not for wifi. This
could happen due to another network connecting or disconnecting,
such as VPN.
Bug: 179774433
Test: test-only change
Change-Id: Ib2010b3871133c38b6d508bf508134dd9b814ce2