* [PATCH] selftests/core: Fix build issue with CLOSE_RANGE_UNSHARE
@ 2024-01-11 3:47 Hu Yadi
2024-01-12 5:24 ` 回复: " Huyadi
0 siblings, 1 reply; 2+ messages in thread
From: Hu Yadi @ 2024-01-11 3:47 UTC (permalink / raw)
To: jmorris, serge, shuah, mathieu.desnoyers, mic
Cc: linux-api, linux-kernel, linux-security-module, linux-kselftest,
514118380, jiaoxupo, Hu.Yadi
From: "Hu.Yadi" <hu.yadi@h3c.com>
Add head file to fix cpmpile error:
gcc -g -isystem /home/linux/usr/include close_range_test.c -o /home/linux/tools/testing/selftests/core/close_range_test
close_range_test.c: In function ‘close_range_unshare’:
close_range_test.c:111:11: error: ‘CLOSE_RANGE_UNSHARE’ undeclared (first use in this function); did you mean ‘CLONE_NEWUSER’?
CLOSE_RANGE_UNSHARE);
^~~~~~~~~~~~~~~~~~~
Signed-off-by: Hu.Yadi <hu.yadi@h3c.com>
Suggested-by: Jiao <jiaoxupo@h3c.com>
Reviewed-by: Berlin <berlin@h3c.com>
---
tools/testing/selftests/core/close_range_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/core/close_range_test.c b/tools/testing/selftests/core/close_range_test.c
index 534576f06df1..563bc1e55937 100644
--- a/tools/testing/selftests/core/close_range_test.c
+++ b/tools/testing/selftests/core/close_range_test.c
@@ -12,7 +12,7 @@
#include <syscall.h>
#include <unistd.h>
#include <sys/resource.h>
-
+#include <linux/close_range.h>
#include "../kselftest_harness.h"
#include "../clone3/clone3_selftests.h"
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* 回复: [PATCH] selftests/core: Fix build issue with CLOSE_RANGE_UNSHARE
2024-01-11 3:47 [PATCH] selftests/core: Fix build issue with CLOSE_RANGE_UNSHARE Hu Yadi
@ 2024-01-12 5:24 ` Huyadi
0 siblings, 0 replies; 2+ messages in thread
From: Huyadi @ 2024-01-12 5:24 UTC (permalink / raw)
To: jmorris@namei.org, serge@hallyn.com, shuah@kernel.org,
mathieu.desnoyers@efficios.com, mic@digikod.net
Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kselftest@vger.kernel.org, 514118380@qq.com
Any comments will be appreciated
>From: "Hu.Yadi" <hu.yadi@h3c.com>
>
>Add head file to fix cpmpile error:
>
>gcc -g -isystem /home/linux/usr/include close_range_test.c -o /home/linux/tools/testing/selftests/core/close_range_test
>close_range_test.c: In function ‘close_range_unshare’:
>close_range_test.c:111:11: error: ‘CLOSE_RANGE_UNSHARE’ undeclared (first use in this function); did you mean ‘CLONE_NEWUSER’?
> CLOSE_RANGE_UNSHARE);
> ^~~~~~~~~~~~~~~~~~~
>
>Signed-off-by: Hu.Yadi <hu.yadi@h3c.com>
>Suggested-by: Jiao <jiaoxupo@h3c.com>
>Reviewed-by: Berlin <berlin@h3c.com>
>---
> tools/testing/selftests/core/close_range_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/tools/testing/selftests/core/close_range_test.c b/tools/testing/selftests/core/close_range_test.c
>index 534576f06df1..563bc1e55937 100644
>--- a/tools/testing/selftests/core/close_range_test.c
>+++ b/tools/testing/selftests/core/close_range_test.c
>@@ -12,7 +12,7 @@
> #include <syscall.h>
> #include <unistd.h>
> #include <sys/resource.h>
>-
>+#include <linux/close_range.h>
> #include "../kselftest_harness.h"
> #include "../clone3/clone3_selftests.h"
>
>--
>2.23.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-12 5:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11 3:47 [PATCH] selftests/core: Fix build issue with CLOSE_RANGE_UNSHARE Hu Yadi
2024-01-12 5:24 ` 回复: " Huyadi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox