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

Commit 4365755d authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

move SKIP_IF_BPF_NOT_SUPPORTED from BpfUtils.h



Test: TreeHugger
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I01850a161d2d5ea727fd173cd51af27684e2ed36
parent 19b5229f
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -75,6 +75,14 @@
#include "tests/tun_forwarder.h"
#include "tests/tun_forwarder.h"
#include "tests/unsolicited_listener/unsolicited_event_listener.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
// Valid VPN netId range is 100 ~ 65535
constexpr int TEST_VPN_NETID = 65502;
constexpr int TEST_VPN_NETID = 65502;
constexpr int MAXPACKET = (8 * 1024);
constexpr int MAXPACKET = (8 * 1024);