BpfUtils.h - add back SKIP_IF_BPF_NOT_SUPPORTED macro
Needs to be used by dns mainline module tests on R devices (Pixel 2). Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I2974a5368f4a9d744e30be9148aefac117d09acb
This commit is contained in:
parent
cb358de067
commit
67fa2073ff
1 changed files with 16 additions and 0 deletions
|
|
@ -45,6 +45,22 @@ static inline bool isAtLeastKernelVersion(unsigned major, unsigned minor, unsign
|
|||
return kernelVersion() >= KVER(major, minor, sub);
|
||||
}
|
||||
|
||||
#define SKIP_IF_BPF_SUPPORTED \
|
||||
do { \
|
||||
if (android::bpf::isAtLeastKernelVersion(4, 9, 0)) { \
|
||||
GTEST_LOG_(INFO) << "This test is skipped since bpf is supported\n"; \
|
||||
return; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define SKIP_IF_BPF_NOT_SUPPORTED \
|
||||
do { \
|
||||
if (!android::bpf::isAtLeastKernelVersion(4, 9, 0)) { \
|
||||
GTEST_LOG_(INFO) << "This test is skipped since bpf is not supported\n"; \
|
||||
return; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define SKIP_IF_EXTENDED_BPF_NOT_SUPPORTED \
|
||||
do { \
|
||||
if (!android::bpf::isAtLeastKernelVersion(4, 14, 0)) { \
|
||||
|
|
|
|||
Loading…
Reference in a new issue