add SKIP_IF_XDP_NOT_SUPPORTED macro
Test: builds, atest, TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ia954983565250faff547e81a53ec0df5fc26827e
This commit is contained in:
parent
916d2395cc
commit
a36bed395f
1 changed files with 9 additions and 0 deletions
|
|
@ -57,6 +57,15 @@ static inline bool isAtLeastKernelVersion(unsigned major, unsigned minor, unsign
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define SKIP_IF_XDP_NOT_SUPPORTED \
|
||||
do { \
|
||||
if (!android::bpf::isAtLeastKernelVersion(5, 9, 0)) { \
|
||||
GTEST_LOG_(INFO) << "This test is skipped since xdp" \
|
||||
<< "not supported\n"; \
|
||||
return; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
} // namespace bpf
|
||||
} // namespace android
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue