summaryrefslogtreecommitdiff
path: root/tests/net/java/com/android/server/IpSecServiceRefcountedResourceTest.java
AgeCommit message (Collapse)Author
2021-05-13Move net unit tests to packages/ConnectivityRemi NGUYEN VAN
Move the tests together with packages/Connectivity code, so both can be moved to packages/modules/Connectivity together. Also reorganize unit tests in a unit/ directory, as other tests (integration/, common/ etc.) have been added in tests/net since they were created. This makes the directory structure consistent. Test: atest FrameworksNetTests Bug: 187814163 Ignore-AOSP-First: needs per-branch move for merge conflicts Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
2021-02-08Remove unused INetworkManagementService from IpSecServicelucaslin
IpSecService is no longer using any methods of INetworkManagementService, so remove it from IpSecService and related files. Bug: 170598012 Test: atest FrameworksNetTests Change-Id: I852e3a534e0ffd26b4b22420754f3ec8a6f153ad
2020-03-10Automatically set IPsec tunnel interface as upBenedict Wong
This change makes IPsec tunnel interfaces automatically get brought up once they are created. Originally this was considered to be an additional safety check, as they would not be start routing traffic until explicitly brought up. However, in the intervening time, the NetworkManagementController now requires the NETWORK_STACK permission to set an interface as up. Additionally, that call is a hidden API, and thus not usable for use cases such as IWLAN. Bug: 149348618 Test: FrameworksNetTests, CtsNetTestCases passing. Change-Id: I55b63a748463a388e1e2991d2d5d6b3023545e60
2019-04-08Fix remove-before-add for IpSecService RefcountedResourceBenedict Wong
This patch fixes a bug where if a binder dies before the linkToDeath call, the cleanup will be performed before the entry is added to the array. While it is safe in that quotas and tracking performs as per normal, the RefcountedRecord may not be cleaned up. Rethrowing this exception is safe, since the only paths that would hit this are all on binder threads coming from applications. Further, it seems there is only one real way of this getting hit - if the app that called the creation died during the binder call. Bug: 126802451 Test: Compiled, CTS tests passing Change-Id: I6db75853da9f29e1573512e26351623f22770c5d
2019-03-05Migrate frameworks/base/tests/net/ to androidx.testBrett Chabot
Test: atest FrameworksNetTests Change-Id: Iaa59d606f5e1678cc5aaca9ed37e184fad894e5d
2017-12-12Add reference counted resources to IpSecServiceBenedict Wong
This patch adds (but does not enable the usage of) RefcountedResource objects to IpSecService, with tests to ensure correct function. This is patch 1 of a series of patches to refactor the resource management systems in IpSecService. RefcountedResource objects allow for management of acyclical dependency trees, ensuring eventual cleanup when resources are no longer used. This cleanup may be triggered by binder death or by explicit user action. Bug: 63409385 Test: New tests written in IpSecServiceRefcountedResourceTest, explicitly testing the RefcountedResource class Change-Id: Ib5be7482b2ef5f1c8dec9be68f15e90d8b3aba6d