Commit graph android_packages_modules_Co.../tests/native/utilities/firewall.cpp
Message SHA1
eliminate some casts
follow up to http://aosp/2965923 to hopefully eliminate
that class of bug in the future...

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie09db001ff15a6b2b15bb1bb0c1ce8228e162337

Maciej Żenczykowski   commited 2024-02-16 18:20:55 +00:00
d7ade39c0c
Use uint_32 for UidOwnerMatchType
The enum is already using 12 bits, so using fewer bits loses information.
This is in sync with the UidOwnerValue struct used to contain this data.

Test: atest resolv_integration_test
Test: atest resolv_unit_test

Bug: 325150155
Change-Id: Ide0ccea9614cda803b3700a0cc22977e9608209e

Suprabh Shukla   commited 2024-02-15 12:54:48 -08:00
c806db20f7
Update to fmtlib 10.1.1
fmtlib 10+ removes the automatic formatting
of enum classes to the underlying class, requesting
that a custom formatter be provided for the type.

Normally fmt::underlying could be used to convert
the enum value to its backing type, but this change
automerges to udc-mainline-prod where the helper does
not exist.

Bug: 310046696
Test: m
Change-Id: I62f3a66dd2f8e3d288dc4c0298d4f3bfa57a6a71

Henri Chataing   commited 2023-11-10 01:53:03 +00:00
9007cca051
[Test] Fix DNS resolver MTS failures
In MTS, test infra installs only the DNS resolver module without
installing tethering module. The test utils should not assume the BPF
maps defined in tethering will be in the device.

Bug: 309164580
Test: atest
resolv_integration_test:ResolverTest#BlockDnsQueryWithUidRule

Change-Id: I2c7349a11c9b413c129c93d236c8280588097cf7

Ken Chen   commited 2023-11-04 16:10:34 +08:00
90e009be6c
Add Data Saver utils in Firewall test helper class
Resolv_integration_test needs the function to toggle Data Saver settings
in BPF map.

Bug: 288340533
Test: atest resolv_integration_test
Change-Id: I1725d3c8c6fc641b855c935d7289a99f78dd5933

Ken Chen   commited 2023-11-01 06:23:09 +08:00
5b144a1061
Add libconnectivity_native_test_utils
The utility currently contains a firewall class that is used by DNS
resolver tests to block DNS packets.

Bug: 227159929
Test: atest resolv_integration_test
Change-Id: I5c5bc0b263a677f57cd63f002057ff0812f15e64

Ken Chen   commited 2022-07-29 03:53:24 +08:00
c52cbe0cf8