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

Commit d5bbfd17 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by Automerger Merge Worker
Browse files

move SKIP_IF_BPF_NOT_SUPPORTED from BpfUtils.h am: 4365755d

parents 560c1ea8 4365755d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -75,6 +75,14 @@
#include "tests/tun_forwarder.h"
#include "tests/unsolicited_listener/unsolicited_event_listener.h"

// This mainline module test still needs to be able to run on pre-S devices,
// and thus may run across pre-4.9 non-eBPF capable devices like the Pixel 2.
#define SKIP_IF_BPF_NOT_SUPPORTED                           \
    do {                                                    \
        if (!android::bpf::isAtLeastKernelVersion(4, 9, 0)) \
            GTEST_SKIP() << "Skip: bpf is not supported.";  \
    } while (0)

// Valid VPN netId range is 100 ~ 65535
constexpr int TEST_VPN_NETID = 65502;
constexpr int MAXPACKET = (8 * 1024);