From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, thuth@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] test: replace gtester with a TAP driver
Date: Mon, 11 Feb 2019 15:32:08 +0100 [thread overview]
Message-ID: <20190211143208.GD8135@linux.fritz.box> (raw)
In-Reply-To: <fffb008e-c16c-5db9-14bf-c779b7b08ae1@redhat.com>
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
next prev parent reply other threads:[~2019-02-11 14:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 21:50 [Qemu-devel] [PATCH for-4.0 v2 0/2] test: replace gtester with a TAP driver Paolo Bonzini
2018-12-06 21:50 ` [Qemu-devel] [PATCH 1/2] test: execute g_test_run when tests are skipped Paolo Bonzini
2018-12-07 6:17 ` Thomas Huth
2018-12-06 21:50 ` [Qemu-devel] [PATCH 2/2] test: replace gtester with a TAP driver Paolo Bonzini
2018-12-07 6:15 ` Thomas Huth
2019-02-08 12:48 ` Kevin Wolf
2019-02-08 13:46 ` Paolo Bonzini
2019-02-08 16:00 ` Kevin Wolf
2019-02-08 17:16 ` Paolo Bonzini
2019-02-11 14:32 ` Kevin Wolf [this message]
2019-02-11 14:54 ` Paolo Bonzini
2019-07-01 14:42 ` Philippe Mathieu-Daudé
2019-07-03 11:29 ` Paolo Bonzini
-- strict thread matches above, loose matches on Subject: below --
2018-11-29 17:45 [Qemu-devel] [PATCH for-4.0 0/2] " Paolo Bonzini
2018-11-29 17:45 ` [Qemu-devel] [PATCH 2/2] " Paolo Bonzini
2018-11-29 21:06 ` Eric Blake
2018-11-29 22:04 ` Paolo Bonzini
2018-11-30 15:50 ` Daniel P. Berrangé
2018-11-30 16:19 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190211143208.GD8135@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).