- Jul 22, 2022
-
-
Paul Hu authored
-
Remi NGUYEN VAN authored
-
- Jul 21, 2022
-
-
Treehugger Robot authored
-
Patrick Rohr authored
-
Treehugger Robot authored
-
Patrick Rohr authored
DscpPolicyTest does not have an IpClient, so it relies on assigning the LinkAddresses at interface creation. If DAD is enabled, the global address cannot be used immediately, so the test packet selects the wrong source address. There is no obvious way to fix this without disabling DAD as the TestableNetworkCallback receives the LinkProperties update before the address can be used. This functionality will also be useful in ethernet tests, which currently have to block for a long time. Test: atest DscpPolicyTest Bug: 235559605 Change-Id: Id7788df5e92ebd8eaf4619a23f44135ea4a2144e
-
Treehugger Robot authored
-
Mark Chien authored
-
Ken Chen authored
* changes: Rename time_in_state.o to timeInState.o Rename gpu_mem.o to gpuMem.o
-
Maciej Żenczykowski authored
Bug: 239807354 Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I52ceaca887eba9eb3bef6165fd87f289c6893287
-
Lucas Lin authored
-
Remi NGUYEN VAN authored
Only depend on a newly created DhcpPacketLib library, which only contains DhcpPacket classes for test usage purposes. This avoids including the NetworkStack manifest, and many unnecessary classes. Test: atest CtsNetTestCases Change-Id: I0047826ef8bb56f229b296f0b3c337b2de1fbc93
-
Ken Chen authored
Underscore character may cause bpf prog/map naming collision. For example, x.o with map y_z and x_y.o with map z both result in x_y_z prog/map name, which should be prevented during compile-time. aosp/2147825 will prohibit underscore character in bpf source name (source name derives the obj name). Existing bpf modules with underscore characters in source name need to be updated accordingly. Bug: 236706995 Test: adb root; adb shell ls -l /sys/fs/bpf/ | grep timeInState Test: atest CtsNativeNetTestCases:BpfTest#bpfStructSizeTest Change-Id: Ic1ded563b8d42ecde3d32a27130f9f01a89c8572
-
Ken Chen authored
Underscore character may cause bpf prog/map naming collision. For example, x.o with map y_z and x_y.o with map z both result in x_y_z prog/map name, which should be prevented during compile-time. aosp/2147825 will prohibit underscore character in bpf source name (source name derives the obj name). Existing bpf modules with underscore characters in source name need to be updated accordingly. Bug: 236706995 Test: atest CtsNativeNetTestCases:BpfTest#bpfStructSizeTest Change-Id: I2ab39503d385d0f794d42f610e8439042460cec0
-
Maciej Żenczykowski authored
-
Lorenzo Colitti authored
This is more correct for three reasons: 1. adoptShellPermission / dropShellPermission calls cannot be nested, because the first drop call drops all permissions, not just the most-recently adopted set. 2. adoptShellPermissionIdentity calls that do not specify any permissions are discouraged because they have the side effect of changing the UID and removing any permissions that the calling UID had. This can cause privileged tests to fail. 3. The comments in the test say that the permission being tested is NETWORK_AIRPLANE_MODE, but the shell doesn't even have NETWORK_AIRPLANE_MODE; the test currently passes only because it adopts all shell permissions, including NETWORK_SETTINGS. A treehugger run suggests this is the only test that has problem (1) above. Once this test is fixed, we can make runAsShell throw an exception when nested, making it easier to avoid this problem. Test: test-only change Change-Id: I0ce4514f01280148f7af859b6163ebdc7baa26d2
-
Remi NGUYEN VAN authored
-
Remi NGUYEN VAN authored
-
Wei Wang authored
Test: n/a, owners change Change-Id: I4531832ce9c68230ee4e6e4b8fcd0ce5e29da87f
-
Patrick Rohr authored
jniThrowNullPointerException() does not throw an exception / return in native code. Test: TH Change-Id: I1116d85ba1bd4545c21d3e20eb2de5eabfe6a084
-
lucaslin authored
Bug: 236315805 Test: atest FrameworksNetTests:VpnTest Change-Id: I0ee4a70ded4937a1573d34cddab552f762e4fc18
-
- Jul 20, 2022
-
-
Lucas Lin authored
-
Treehugger Robot authored
-
Remi NGUYEN VAN authored
Just include all files with a blob, instead of listing them separately. All files in the directory were previously referenced by framework-connectivity-tiramisu-updatable-sources, so this is a no-op. Bug: 217129444 Test: m Change-Id: I83415b8f2a5836874c5ea2bffee45c43e03cc139
-
Remi NGUYEN VAN authored
(This rolls forward part of a previous change, now that jarjar was fixed to not get very slow when the number of rules increases). Autogenerate connectivity jarjar rules at build time, to avoid issues with forgotten jarjar rules or hard-to-diagnose errors introduced by incorrect rules. This change causes all classes in framework-connectivity(-t) and service-connectivity to be jarjared into android.net.connectivity, but still avoids jarjaring classes in com.android.server as before, to keep it small. For many classes this differs from the original jarjar rule. Notes on implementation: - connectivity-jarjar-rules now has a subset framework-connectivity-jarjar-rules containing only the rules necessary for framework-connectivity. This is necessary because framework-connectivity cannot depend on rules generated based on service-connectivity, as there would be a dependency cycle (service-connectivity depends on framework-connectivity); Soong even crashes with a stack overflow. - framework-wifi.stubs.module_lib is added to framework-connectivity-pre-jarjar as it is necessary to build it (it is already in impl_only_libs in the defaults). It is unclear why framework-connectivity-pre-jarjar could build before that (possibly because it was only used as "lib" ?) - Fix package-private visibility; for example NattSocketKeepalive, TcpSocketKeepalive are not API so should be jarjared, but are used by ConnectivityManager which is not jarjared, so they are not in the same package after the change. Package-private members in the former 2 need to be public to be accessible. Changes in this commit are all that is needed, as demonstrated by followup commits that move the classes to a different package without further changes, and that enforce that no class in an API package gets jarjared. - framework-connectivity-internal-test-defaults is separated from framework-connectivity-test-defaults, for unit tests that need to access internal jarjared classes. Such tests need to use the jarjar rules themselves too, so this is only appropriate for connectivity internal unit tests. Test: atest ConnectivityCoverageTests CtsNetTestCases Bug: 217129444 Change-Id: Ib1bd939b71c0171d945fc01b96195d2f620ff13b
-
Paul Hu authored
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
-
Aaron Huang authored
-
Aaron Huang authored
Test: build Change-Id: I4366480e7a71004612d775bfa54744cc74c1fd7b
-
Aaron Huang authored
-
- Jul 19, 2022
-
-
Treehugger Robot authored
-
Maciej Żenczykowski authored
Test: TreeHugger, atest bpf_existence_test Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I41c8a3c1764c1542f0d3e68a4713d8984ef58db0
-
Treehugger Robot authored
-
Maciej Żenczykowski authored
-
- Jul 18, 2022
-
-
Maciej Żenczykowski authored
InProcessTethering runs as system_server (uid/gid AID_SYSTEM) instead of as the network_stack (uid/gid AID_NETWORK_STACK). Additionally only the network_stack has access to the default selinux context of /sys/fs/bpf/tethering, which is fs_bpf_tethering, so we need to use 'fs_bpf_net_shared' instead. Bug: 190523685 Bug: 236925089 Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: Ibb6ae255dcd8a8e8049be112055f60c3b2cf7df0
-
Patrick Rohr authored
-
Aaron Huang authored
Use Builder API which was provided in Android T to build a template. Bug: 238843364 Test: build, FrameworksNetTests:NetworkStatsManagerTest Change-Id: Ibf1ac16541d6f3ddaf9b241e2f47ae04acbedf93
-
- Jul 16, 2022
-
-
Maciej Żenczykowski authored
(mainly driven by the desire to make it clear this is about *current* mainline state and not at-T-launch state of things) Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I928f91704f78205ffe44611a3d3abe383c4e560b
-
Maciej Żenczykowski authored
The objdump -x visible changes between old and new versions of the mainline shipped .o files are really very minimal: just the inclusion of a new .BTF section and changes/removals of some 'l' entries from the symbol table. However, it turns out a change to symbol ordering is incompatible with BpfLoader <v0.10 which doesn't know to skip non-function symbols, and as such enabling btf requires a little bit of gymnastics. After: $ adbz shell ls -l /apex/com.android.tethering/etc/bpf/*.o -rw-r--r-- 1 system system 118352 1969-12-31 16:00 /apex/com.android.tethering/etc/bpf/offload.o -rw-r--r-- 1 system system 123424 1969-12-31 16:00 /apex/com.android.tethering/etc/bpf/offload@btf.o -rw-r--r-- 1 system system 2232 1969-12-31 16:00 /apex/com.android.tethering/etc/bpf/test.o -rw-r--r-- 1 system system 6376 1969-12-31 16:00 /apex/com.android.tethering/etc/bpf/test@btf.o $ adbz shell logcat -d | egrep offload.*[.]o 07-15 13:10:43.358 0 0 D LibBpfLoader: Loading critical for tethering ELF object /apex/com.android.tethering/etc/bpf/offload.o with license Apache 2.0 07-15 13:10:43.359 0 0 I LibBpfLoader: BpfLoader version 0x00019 ignoring ELF object /apex/com.android.tethering/etc/bpf/offload.o with max ver 0x00019 07-15 13:10:43.359 0 0 I bpfloader: Loaded object: /apex/com.android.tethering/etc/bpf/offload.o 07-15 13:10:43.374 0 0 D LibBpfLoader: Loading critical for tethering ELF object /apex/com.android.tethering/etc/bpf/offload@btf.o with license Apache 2.0 07-15 13:10:43.375 0 0 I LibBpfLoader: BpfLoader version 0x00019 processing ELF object /apex/com.android.tethering/etc/bpf/offload@btf.o with ver [0x00019,0x10000) 07-15 13:10:43.452 0 0 D LibBpfLoader: map_fd found at 0 is 6 in /apex/com.android.tethering/etc/bpf/offload@btf.o ... Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: Id658818d1d42763358747523615b7918d312588e
-
Remi NGUYEN VAN authored
-
- Jul 15, 2022
-
-
Treehugger Robot authored
-