Am 08.02.2019 um 18:16 hat Paolo Bonzini geschrieben: > On 08/02/19 17:00, Kevin Wolf wrote: > > Am 08.02.2019 um 14:46 hat Paolo Bonzini geschrieben: > >> On 08/02/19 13:48, Kevin Wolf wrote: > >>> I just wanted to work on a unit test and found that a simple 'make > >>> check-tests/test-bdrv-drain' (which used to build and run the test with > >>> a single command) doesn't work any more. > >>> > >>> git bisect points to this commit. > >> > >> What's wrong with "tests/test-bdrv-drain"? (Before there were some > >> differences in test environment, but not now). > > > > It runs the old version without building the source I just modified. > > Oh. Since it wasn't documented, it seemed to be just an implementation > detail rather than something that would be used by people... So > basically something like this? > > diff --git a/tests/Makefile.include b/tests/Makefile.include > index 048cf5639c..6ac3f2c7eb 100644 > --- a/tests/Makefile.include > +++ b/tests/Makefile.include > @@ -861,6 +861,9 @@ check-unit: $(check-unit-y) > check-speed: $(check-speed-y) > $(call do_test_human, $^) > > +$(patsubst %, check-%, $(check-unit-y) $(check-speed-y): check-%: % > + $<
Apart from the missing closing bracket. :-) The old rule seems to have been like this: .PHONY: $(patsubst %, check-%, $(check-unit-y) $(check-speed-y)) $(patsubst %, check-%, $(check-unit-y) $(check-speed-y)): check-%: % $(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,) $(call quiet-command, \ MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$(( $${RANDOM:-0} % 255 + 1))} \ gtester $(GTESTER_OPTIONS) -m=$(SPEED) $*,"GTESTER","$*") $(if $(CONFIG_GCOV),@for f in $(gcov-files-$(subst tests/,,$*)-y) $(gcov-files-generic-y); do \ echo Gcov report for $$f:;\ $(GCOV) $(GCOV_OPTIONS) $$f -o `dirname $$f`; \ done,) So it used quiet-command (but I'm okay with changing this) and it set MALLOC_PERTURB_ (I think this would still be nice to have). Not sure how relevant the gcov stuff is, I never used this. I think the minimal change for this commit would have been to just remove 'gtester $(GTESTER_OPTIONS) -m=$(SPEED)' and leave everything else in place. Kevin