From: Cheng Jian cj.chengjian@huawei.com
hulk inclusion category: bugzilla bugzilla: 28332 CVE: NA
-------------------------------------------------
commit 2293e84612ef ("selftests, sched/membarrier: Add multi-threaded test") add a new test for membarrier. Some non-existent functions were used.
ksft_set_plan() was introduced by the following commit : 5821ba969511 ("selftests: Add test plan API to kselftest.h and adjust callers") which was not be merged.
so we get the next error when compile this testcase : membarrier_test_single_thread.c: In function 'main': membarrier_test_single_thread.c:15:2: warning: implicit declaration of function 'ksft_set_plan'; did you mean 'ksft_exit_pass'? [-Wimplicit-function-declaration] ksft_set_plan(13); ^~~~~~~~~~~~~ ksft_exit_pass
Fixes : 2293e84612ef ("selftests, sched/membarrier: Add multi-threaded test") Signed-off-by: Cheng Jian cj.chengjian@huawei.com Reviewed-By: Xie XiuQi xiexiuqi@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- tools/testing/selftests/membarrier/membarrier_test_multi_thread.c | 1 - tools/testing/selftests/membarrier/membarrier_test_single_thread.c | 1 - 2 files changed, 2 deletions(-)
diff --git a/tools/testing/selftests/membarrier/membarrier_test_multi_thread.c b/tools/testing/selftests/membarrier/membarrier_test_multi_thread.c index ac5613e..6ae8678 100644 --- a/tools/testing/selftests/membarrier/membarrier_test_multi_thread.c +++ b/tools/testing/selftests/membarrier/membarrier_test_multi_thread.c @@ -62,7 +62,6 @@ static int test_mt_membarrier(void) int main(int argc, char **argv) { ksft_print_header(); - ksft_set_plan(13);
test_membarrier_query();
diff --git a/tools/testing/selftests/membarrier/membarrier_test_single_thread.c b/tools/testing/selftests/membarrier/membarrier_test_single_thread.c index c1c9639..97dd81d 100644 --- a/tools/testing/selftests/membarrier/membarrier_test_single_thread.c +++ b/tools/testing/selftests/membarrier/membarrier_test_single_thread.c @@ -12,7 +12,6 @@ int main(int argc, char **argv) { ksft_print_header(); - ksft_set_plan(13);
test_membarrier_query();