diff options
author | Maciej Żenczykowski <maze@google.com> | 2021-01-21 04:43:34 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-01-21 04:43:34 +0000 |
commit | 7d7af8b3d8c6b89bd9c5be11b3566c4e1c1c399e (patch) | |
tree | f4c7a19ce1284bb01a50c4d3ca7379f224819b8d | |
parent | a973c0badf958e1b09663073db38b0b130338540 (diff) | |
parent | a36bed395f014aa69f08ae6dadb6f9684e448275 (diff) | |
download | platform_system_bpf-7d7af8b3d8c6b89bd9c5be11b3566c4e1c1c399e.tar.gz platform_system_bpf-7d7af8b3d8c6b89bd9c5be11b3566c4e1c1c399e.tar.bz2 platform_system_bpf-7d7af8b3d8c6b89bd9c5be11b3566c4e1c1c399e.zip |
add SKIP_IF_XDP_NOT_SUPPORTED macro am: a36bed395f
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1555041
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I6031e2218630aea6143b5eb2d922d7f6e92a2dd7
-rw-r--r-- | libbpf_android/include/bpf/BpfUtils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbpf_android/include/bpf/BpfUtils.h b/libbpf_android/include/bpf/BpfUtils.h index bb097bf..e67f664 100644 --- a/libbpf_android/include/bpf/BpfUtils.h +++ b/libbpf_android/include/bpf/BpfUtils.h @@ -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 |