* [PATCH] selftests: alsa: make LDLIBS consistent
@ 2023-08-22 13:15 Ricardo B. Marliere
2023-08-22 14:05 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo B. Marliere @ 2023-08-22 13:15 UTC (permalink / raw)
To: broonie, skhan; +Cc: linux-kselftest, linux-kernel, Ricardo B. Marliere
In kselftest_deps.sh script, the level 3 parser is broken for the alsa
subsystem Makefile.
Output before patch:
$ ./kselftest_deps.sh gcc alsa
========================================================
Kselftest Dependency Check for [./kselftest_deps.sh gcc alsa] results...
========================================================
Checked tests defining LDLIBS dependencies
--------------------------------------------------------
Total tests with Dependencies:
6 Pass: 2 Fail: 4
--------------------------------------------------------
PASS: alsa/Makefile dependency check passed -lasound
PASS: alsa/Makefile dependency check passed -lpthread
--------------------------------------------------------
Targets passed build dependency check on system:
alsa
--------------------------------------------------------
FAIL: alsa/Makefile dependency check: $(shell
FAIL: alsa/Makefile dependency check: pkg-config
FAIL: alsa/Makefile dependency check: --libs
FAIL: alsa/Makefile dependency check: alsa)
--------------------------------------------------------
Targets failed build dependency check on system:
alsa
--------------------------------------------------------
Missing libraries system
$(shell alsa) --libs pkg-config
--------------------------------------------------------
========================================================
Output after patch:
$ ./kselftest_deps.sh gcc alsa
========================================================
Kselftest Dependency Check for [./kselftest_deps.sh gcc alsa] results...
========================================================
Checked tests defining LDLIBS dependencies
--------------------------------------------------------
Total tests with Dependencies:
2 Pass: 2 Fail: 0
--------------------------------------------------------
PASS: alsa/Makefile dependency check passed -lasound
PASS: alsa/Makefile dependency check passed -lpthread
--------------------------------------------------------
Targets passed build dependency check on system:
alsa
--------------------------------------------------------
========================================================
Signed-off-by: Ricardo B. Marliere <rbmarliere@gmail.com>
---
tools/testing/selftests/alsa/Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile
index 5af9ba8a4645..b5670049c4e5 100644
--- a/tools/testing/selftests/alsa/Makefile
+++ b/tools/testing/selftests/alsa/Makefile
@@ -2,13 +2,13 @@
#
CFLAGS += $(shell pkg-config --cflags alsa)
-LDLIBS += $(shell pkg-config --libs alsa)
-ifeq ($(LDLIBS),)
-LDLIBS += -lasound
+VAR_LDLIBS += $(shell pkg-config --libs alsa)
+ifeq ($(VAR_LDLIBS),)
+VAR_LDLIBS += -lasound
endif
CFLAGS += -L$(OUTPUT) -Wl,-rpath=./
-LDLIBS+=-lpthread
+VAR_LDLIBS+=-lpthread
OVERRIDE_TARGETS = 1
@@ -21,7 +21,7 @@ TEST_FILES := conf.d pcm-test.conf
include ../lib.mk
$(OUTPUT)/libatest.so: conf.c alsa-local.h
- $(CC) $(CFLAGS) -shared -fPIC $< $(LDLIBS) -o $@
+ $(CC) $(CFLAGS) -shared -fPIC $< $(VAR_LDLIBS) -o $@
$(OUTPUT)/%: %.c $(TEST_GEN_PROGS_EXTENDED) alsa-local.h
- $(CC) $(CFLAGS) $< $(LDLIBS) -latest -o $@
+ $(CC) $(CFLAGS) $< $(VAR_LDLIBS) -latest -o $@
--
2.40.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests: alsa: make LDLIBS consistent
2023-08-22 13:15 [PATCH] selftests: alsa: make LDLIBS consistent Ricardo B. Marliere
@ 2023-08-22 14:05 ` Mark Brown
2023-08-22 21:19 ` Ricardo Marliere
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2023-08-22 14:05 UTC (permalink / raw)
To: Ricardo B. Marliere; +Cc: skhan, linux-kselftest, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
On Tue, Aug 22, 2023 at 10:15:45AM -0300, Ricardo B. Marliere wrote:
> In kselftest_deps.sh script, the level 3 parser is broken for the alsa
> subsystem Makefile.
> CFLAGS += $(shell pkg-config --cflags alsa)
> -LDLIBS += $(shell pkg-config --libs alsa)
> -ifeq ($(LDLIBS),)
> -LDLIBS += -lasound
> +VAR_LDLIBS += $(shell pkg-config --libs alsa)
> +ifeq ($(VAR_LDLIBS),)
> +VAR_LDLIBS += -lasound
This seems like an undocumented bodge for whatever limitation the
checker script has. If nothing else someone might come along later and
switch back to using the standard variable name, and TBH it does feel
like it'd be better to teach the checker to understand the pkg-config
idiom here.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests: alsa: make LDLIBS consistent
2023-08-22 14:05 ` Mark Brown
@ 2023-08-22 21:19 ` Ricardo Marliere
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Marliere @ 2023-08-22 21:19 UTC (permalink / raw)
To: Mark Brown; +Cc: skhan, linux-kselftest, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
On Tue, Aug 22, 2023 at 03:05:27PM +0100, Mark Brown wrote:
> This seems like an undocumented bodge for whatever limitation the
> checker script has. If nothing else someone might come along later and
> switch back to using the standard variable name, and TBH it does feel
> like it'd be better to teach the checker to understand the pkg-config
> idiom here.
I agree, I submitted a patch to fix the checker script.
Thank you Mark
--
Ricardo Marliere https://marliere.net/
030A 8E9E 424E E3C0 6557 87E1 C90B 8A7C 6386 58A6
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-22 21:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 13:15 [PATCH] selftests: alsa: make LDLIBS consistent Ricardo B. Marliere
2023-08-22 14:05 ` Mark Brown
2023-08-22 21:19 ` Ricardo Marliere
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®