* [RFC PATCH] tests/tcg: add mechanism to handle plugin arguments
@ 2023-05-18 15:27 Alex Bennée
2023-05-18 15:32 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2023-05-18 15:27 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Richard Henderson, Philippe Mathieu-Daudé
We recently missed a regression that should have been picked up by
check-tcg. This was because the libmem plugin is effectively a NOP if
the user doesn't specify the type to use.
Rather than changing the default behaviour add an additional expansion
so we can take this into account in future.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
---
tests/tcg/Makefile.target | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target
index 72876cc84e..2462c26000 100644
--- a/tests/tcg/Makefile.target
+++ b/tests/tcg/Makefile.target
@@ -169,13 +169,17 @@ extract-plugin = $(wordlist 2, 2, $(subst -with-, ,$1))
RUN_TESTS+=$(EXTRA_RUNS)
+# Some plugins need additional arguments above the default to fully
+# exercise things. We can define them on a per-test basis here.
+run-plugin-%-with-libmem.so: PLUGIN_ARGS=$(COMMA)inline=true$(COMMA)callback=true
+
ifeq ($(filter %-softmmu, $(TARGET)),)
run-%: %
$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<)
run-plugin-%:
$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
- -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
+ -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \
-d plugin -D $*.pout \
$(call strip-plugin,$<))
else
@@ -189,7 +193,7 @@ run-plugin-%:
$(call run-test, $@, \
$(QEMU) -monitor none -display none \
-chardev file$(COMMA)path=$@.out$(COMMA)id=output \
- -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
+ -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \
-d plugin -D $*.pout \
$(QEMU_OPTS) $(call strip-plugin,$<))
endif
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] tests/tcg: add mechanism to handle plugin arguments
2023-05-18 15:27 [RFC PATCH] tests/tcg: add mechanism to handle plugin arguments Alex Bennée
@ 2023-05-18 15:32 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2023-05-18 15:32 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: Philippe Mathieu-Daudé
On 5/18/23 08:27, Alex Bennée wrote:
> We recently missed a regression that should have been picked up by
> check-tcg. This was because the libmem plugin is effectively a NOP if
> the user doesn't specify the type to use.
>
> Rather than changing the default behaviour add an additional expansion
> so we can take this into account in future.
>
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> Cc: Richard Henderson<richard.henderson@linaro.org>
> ---
> tests/tcg/Makefile.target | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-18 15:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-18 15:27 [RFC PATCH] tests/tcg: add mechanism to handle plugin arguments Alex Bennée
2023-05-18 15:32 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).