BpfUtils.h - add back SKIP_IF_BPF_NOT_SUPPORTED macro am: 67fa2073ff
am: 625c2c6bc6
am: c5468f82d4
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1631935 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I0e6a740dcb11c9c8ea73ba9aa8646e473a5a3242
This commit is contained in:
commit
1ebce20b0f
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