提交 6d85c34d 编写于 作者: F Florent Revest 提交者: Zheng Zengkai

selftests/bpf: Fix the ASSERT_ERR_PTR macro

mainline inclusion
from mainline-5.13-rc1
commit 1969b3c6
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1969b3c60db675040ec0d1b09698807647aac7ed

-------------------------------------------------

It is just missing a ';'. This macro is not used by any test yet.

Fixes: 22ba3635 ("selftests/bpf: Move and extend ASSERT_xxx() testing macros")
Signed-off-by: NFlorent Revest <revest@chromium.org>
Signed-off-by: NAndrii Nakryiko <andrii@kernel.org>
Acked-by: NMartin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210414155632.737866-1-revest@chromium.org
(cherry picked from commit 1969b3c6)
Signed-off-by: NWang Yufen <wangyufen@huawei.com>
上级 0aca3dc1
...@@ -200,7 +200,7 @@ extern int test__join_cgroup(const char *path); ...@@ -200,7 +200,7 @@ extern int test__join_cgroup(const char *path);
#define ASSERT_ERR_PTR(ptr, name) ({ \ #define ASSERT_ERR_PTR(ptr, name) ({ \
static int duration = 0; \ static int duration = 0; \
const void *___res = (ptr); \ const void *___res = (ptr); \
bool ___ok = IS_ERR(___res) \ bool ___ok = IS_ERR(___res); \
CHECK(!___ok, (name), "unexpected pointer: %p\n", ___res); \ CHECK(!___ok, (name), "unexpected pointer: %p\n", ___res); \
___ok; \ ___ok; \
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册