public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/vdso: Add linux/sched.h to fix CLONE_NEWTIME build error
@ 2024-10-02 15:28 SurajSonawane2415
  2024-10-02 22:39 ` Shuah Khan
  2024-10-03 11:52 ` [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom SurajSonawane2415
  0 siblings, 2 replies; 5+ messages in thread
From: SurajSonawane2415 @ 2024-10-02 15:28 UTC (permalink / raw)
  To: shuah, linux-kselftest, linux-kernel; +Cc: SurajSonawane2415

Fix build error in vdso_test_getrandom.c due to missing CLONE_NEWTIME.
Include linux/sched.h to define CLONE_NEWTIME.
Ensure successful compilation by resolving the missing header issue.

Signed-off-by: SurajSonawane2415 <surajsonawane0215@gmail.com>
---
 tools/testing/selftests/vDSO/vdso_test_getrandom.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
index 72a1d9b43..3f2a4dbf8 100644
--- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
@@ -22,6 +22,7 @@
 #include <linux/random.h>
 #include <linux/compiler.h>
 #include <linux/ptrace.h>
+#include <linux/sched.h>
 
 #include "../kselftest.h"
 #include "parse_vdso.h"
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] selftests/vdso: Add linux/sched.h to fix CLONE_NEWTIME build error
  2024-10-02 15:28 [PATCH] selftests/vdso: Add linux/sched.h to fix CLONE_NEWTIME build error SurajSonawane2415
@ 2024-10-02 22:39 ` Shuah Khan
  2024-10-02 22:51   ` Jason A. Donenfeld
  2024-10-03 11:52 ` [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom SurajSonawane2415
  1 sibling, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2024-10-02 22:39 UTC (permalink / raw)
  To: SurajSonawane2415, shuah, Jason A. Donenfeld
  Cc: linux-kselftest, linux-kernel, Shuah Khan

On 10/2/24 09:28, SurajSonawane2415 wrote:
> Fix build error in vdso_test_getrandom.c due to missing CLONE_NEWTIME.
> Include linux/sched.h to define CLONE_NEWTIME.
> Ensure successful compilation by resolving the missing header issue.
> 

Did you run "make headers" before building this test? It builds
just fine for me on my system.

+ Adding Jason Donenfeld

> Signed-off-by: SurajSonawane2415 <surajsonawane0215@gmail.com>
> ---
>   tools/testing/selftests/vDSO/vdso_test_getrandom.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> index 72a1d9b43..3f2a4dbf8 100644
> --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> @@ -22,6 +22,7 @@
>   #include <linux/random.h>
>   #include <linux/compiler.h>
>   #include <linux/ptrace.h>
> +#include <linux/sched.h>
>   
>   #include "../kselftest.h"
>   #include "parse_vdso.h"

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] selftests/vdso: Add linux/sched.h to fix CLONE_NEWTIME build error
  2024-10-02 22:39 ` Shuah Khan
@ 2024-10-02 22:51   ` Jason A. Donenfeld
  2024-10-03 22:26     ` Shuah Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Jason A. Donenfeld @ 2024-10-02 22:51 UTC (permalink / raw)
  To: Shuah Khan; +Cc: SurajSonawane2415, shuah, linux-kselftest, linux-kernel

Wasn't this already submitted and commented on?

https://lore.kernel.org/all/20240919111841.20226-1-liaoyu15@huawei.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom
  2024-10-02 15:28 [PATCH] selftests/vdso: Add linux/sched.h to fix CLONE_NEWTIME build error SurajSonawane2415
  2024-10-02 22:39 ` Shuah Khan
@ 2024-10-03 11:52 ` SurajSonawane2415
  1 sibling, 0 replies; 5+ messages in thread
From: SurajSonawane2415 @ 2024-10-03 11:52 UTC (permalink / raw)
  To: surajsonawane0215; +Cc: linux-kernel, linux-kselftest, shuah

Yes, I ran it but faced an issue. After reading comments on a similar patch shared by Jason A. 
Donenfeld, I realized that my environment is Ubuntu 22.04 (Linux 5.15 + glibc 2.35). 
After upgrading to a newer version of glibc, the issue seems to be fixed. 
I think including <sched.h> might not be needed. I would really appreciate your advice on how to handle this.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] selftests/vdso: Add linux/sched.h to fix CLONE_NEWTIME build error
  2024-10-02 22:51   ` Jason A. Donenfeld
@ 2024-10-03 22:26     ` Shuah Khan
  0 siblings, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2024-10-03 22:26 UTC (permalink / raw)
  To: Jason A. Donenfeld, SurajSonawane2415, Yu Liao
  Cc: shuah, linux-kselftest, linux-kernel, Shuah Khan, Shuah Khan

On 10/2/24 16:51, Jason A. Donenfeld wrote:
> Wasn't this already submitted and commented on?
> 
> https://lore.kernel.org/all/20240919111841.20226-1-liaoyu15@huawei.com/

Thank you Jason. Yes we reviewed this - I asked Yu Liao to send
me v2 since the define is coming in from pthread.h indirectly.

Suraj, Thank for finding and fixing the problem. However Yu Liao sent
in patch for this before you did. We will take that patch.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-03 22:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 15:28 [PATCH] selftests/vdso: Add linux/sched.h to fix CLONE_NEWTIME build error SurajSonawane2415
2024-10-02 22:39 ` Shuah Khan
2024-10-02 22:51   ` Jason A. Donenfeld
2024-10-03 22:26     ` Shuah Khan
2024-10-03 11:52 ` [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom SurajSonawane2415

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox