Skip to content

Commit af323aa

Browse files
committed
tests/tcg: add mechanism to handle plugin arguments
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. Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Message-Id: <[email protected]>
1 parent d2ab529 commit af323aa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/tcg/Makefile.target

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,17 @@ extract-plugin = $(wordlist 2, 2, $(subst -with-, ,$1))
169169

170170
RUN_TESTS+=$(EXTRA_RUNS)
171171

172+
# Some plugins need additional arguments above the default to fully
173+
# exercise things. We can define them on a per-test basis here.
174+
run-plugin-%-with-libmem.so: PLUGIN_ARGS=$(COMMA)inline=true$(COMMA)callback=true
175+
172176
ifeq ($(filter %-softmmu, $(TARGET)),)
173177
run-%: %
174178
$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<)
175179

176180
run-plugin-%:
177181
$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
178-
-plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
182+
-plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \
179183
-d plugin -D $*.pout \
180184
$(call strip-plugin,$<))
181185
else
@@ -189,7 +193,7 @@ run-plugin-%:
189193
$(call run-test, $@, \
190194
$(QEMU) -monitor none -display none \
191195
-chardev file$(COMMA)path=$@.out$(COMMA)id=output \
192-
-plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
196+
-plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \
193197
-d plugin -D $*.pout \
194198
$(QEMU_OPTS) $(call strip-plugin,$<))
195199
endif

0 commit comments

Comments
 (0)