Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined
@ 2024-05-16 15:27 Mark Brown
  2024-05-16 16:04 ` Muhammad Usama Anjum
  2024-05-17  8:35 ` Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2024-05-16 15:27 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Shuah Khan, Muhammad Usama Anjum,
	Edward Liaw, John Hubbard
  Cc: Shuah Khan, linux-sound, linux-kselftest, linux-kernel,
	Mark Brown

The pcmtest driver tests use the kselftest harness which requires that
_GNU_SOURCE is defined but nothing causes it to be defined.  Since the
KHDR_INCLUDES Makefile variable has had the required define added let's
use that, this should provide some futureproofing.

Fixes: daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/alsa/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile
index 5af9ba8a4645..c1ce39874e2b 100644
--- a/tools/testing/selftests/alsa/Makefile
+++ b/tools/testing/selftests/alsa/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 #
 
-CFLAGS += $(shell pkg-config --cflags alsa)
+CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES)
 LDLIBS += $(shell pkg-config --libs alsa)
 ifeq ($(LDLIBS),)
 LDLIBS += -lasound

---
base-commit: 3c999d1ae3c75991902a1a7dad0cb62c2a3008b4
change-id: 20240516-kselftest-fix-gnu-source-81ddd00870a8

Best regards,
-- 
Mark Brown <broonie@kernel.org>


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

* Re: [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined
  2024-05-16 15:27 [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined Mark Brown
@ 2024-05-16 16:04 ` Muhammad Usama Anjum
  2024-05-17  8:35 ` Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Muhammad Usama Anjum @ 2024-05-16 16:04 UTC (permalink / raw)
  To: Mark Brown, Jaroslav Kysela, Takashi Iwai, Shuah Khan,
	Edward Liaw, John Hubbard
  Cc: Muhammad Usama Anjum, Shuah Khan, linux-sound, linux-kselftest,
	linux-kernel

On 5/16/24 9:27 AM, Mark Brown wrote:
> The pcmtest driver tests use the kselftest harness which requires that
> _GNU_SOURCE is defined but nothing causes it to be defined.  Since the
> KHDR_INCLUDES Makefile variable has had the required define added let's
> use that, this should provide some futureproofing.
> 
> Fixes: daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
> Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

> ---
>  tools/testing/selftests/alsa/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile
> index 5af9ba8a4645..c1ce39874e2b 100644
> --- a/tools/testing/selftests/alsa/Makefile
> +++ b/tools/testing/selftests/alsa/Makefile
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  #
>  
> -CFLAGS += $(shell pkg-config --cflags alsa)
> +CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES)
>  LDLIBS += $(shell pkg-config --libs alsa)
>  ifeq ($(LDLIBS),)
>  LDLIBS += -lasound
> 
> ---
> base-commit: 3c999d1ae3c75991902a1a7dad0cb62c2a3008b4
> change-id: 20240516-kselftest-fix-gnu-source-81ddd00870a8
> 
> Best regards,

-- 
BR,
Muhammad Usama Anjum

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

* Re: [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined
  2024-05-16 15:27 [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined Mark Brown
  2024-05-16 16:04 ` Muhammad Usama Anjum
@ 2024-05-17  8:35 ` Takashi Iwai
  2024-05-20 14:23   ` Shuah Khan
  1 sibling, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2024-05-17  8:35 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jaroslav Kysela, Takashi Iwai, Shuah Khan, Muhammad Usama Anjum,
	Edward Liaw, John Hubbard, Shuah Khan, linux-sound,
	linux-kselftest, linux-kernel

On Thu, 16 May 2024 17:27:33 +0200,
Mark Brown wrote:
> 
> The pcmtest driver tests use the kselftest harness which requires that
> _GNU_SOURCE is defined but nothing causes it to be defined.  Since the
> KHDR_INCLUDES Makefile variable has had the required define added let's
> use that, this should provide some futureproofing.
> 
> Fixes: daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
> Signed-off-by: Mark Brown <broonie@kernel.org>

The commit isn't yet in the Linus upstream tree but only in
linux-next.  I guess it's better to put the fix in the tree (Shuah's?)
that introduced this change.  So feel free to take my ack:

Acked-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

> ---
>  tools/testing/selftests/alsa/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile
> index 5af9ba8a4645..c1ce39874e2b 100644
> --- a/tools/testing/selftests/alsa/Makefile
> +++ b/tools/testing/selftests/alsa/Makefile
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  #
>  
> -CFLAGS += $(shell pkg-config --cflags alsa)
> +CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES)
>  LDLIBS += $(shell pkg-config --libs alsa)
>  ifeq ($(LDLIBS),)
>  LDLIBS += -lasound
> 
> ---
> base-commit: 3c999d1ae3c75991902a1a7dad0cb62c2a3008b4
> change-id: 20240516-kselftest-fix-gnu-source-81ddd00870a8
> 
> Best regards,
> -- 
> Mark Brown <broonie@kernel.org>
> 

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

* Re: [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined
  2024-05-17  8:35 ` Takashi Iwai
@ 2024-05-20 14:23   ` Shuah Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2024-05-20 14:23 UTC (permalink / raw)
  To: Takashi Iwai, Mark Brown
  Cc: Jaroslav Kysela, Takashi Iwai, Shuah Khan, Muhammad Usama Anjum,
	Edward Liaw, John Hubbard, linux-sound, linux-kselftest,
	linux-kernel, Shuah Khan

On 5/17/24 02:35, Takashi Iwai wrote:
> On Thu, 16 May 2024 17:27:33 +0200,
> Mark Brown wrote:
>>
>> The pcmtest driver tests use the kselftest harness which requires that
>> _GNU_SOURCE is defined but nothing causes it to be defined.  Since the
>> KHDR_INCLUDES Makefile variable has had the required define added let's
>> use that, this should provide some futureproofing.
>>
>> Fixes: daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE")
>> Signed-off-by: Mark Brown <broonie@kernel.org>
> 
> The commit isn't yet in the Linus upstream tree but only in
> linux-next.  I guess it's better to put the fix in the tree (Shuah's?)
> that introduced this change.  So feel free to take my ack:
> 
> Acked-by: Takashi Iwai <tiwai@suse.de>
> 
> 

Thank you. I will take this through my tree.

thanks,
-- Shuah


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

end of thread, other threads:[~2024-05-20 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 15:27 [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined Mark Brown
2024-05-16 16:04 ` Muhammad Usama Anjum
2024-05-17  8:35 ` Takashi Iwai
2024-05-20 14:23   ` Shuah Khan

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