Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25992f76 authored by Ken Chen's avatar Ken Chen
Browse files

[Test] Modify test to match the behavior change in DnsBpfHelper

The DnsBpfHelper::isUidNetworkingBlocked() change logic to reference
DataSaver setting from BPF map on V+ only. The test in DNS resolver
needs to update accordingly.

Bug: 288340533
Test: atest resolv_integration_test
Change-Id: Ida1119ee6f85f8789a5287911c6b2af74a1bf3bd
parent 21072606
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -571,7 +571,12 @@ TEST_P(TransportParameterizedTest, BlockDnsQuery) {
            // Block network access by enabling data saver.
            ScopedSetDataSaverByBPF scopedSetDataSaverByBPF(true);
            ScopedChangeUID scopedChangeUID(TEST_UID);

            // DataSaver information is only meaningful after V.
            // TODO: Add 'else' to check that DNS queries are not blocked before V.
            if (android::modules::sdklevel::IsAtLeastV()) {
                expectQueriesAreBlocked();
            }
        } else {
            // Block network access by setting UID firewall rules.
            ScopeBlockedUIDRule scopeBlockUidRule(mDnsClient.netdService(), TEST_UID);