qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>,
	patches@linaro.org
Subject: Re: [Qemu-trivial] [PATCH] tests/tcg: Fix compilation of test_path
Date: Mon, 28 Apr 2014 22:49:22 +0200	[thread overview]
Message-ID: <535EBED2.7030705@weilnetz.de> (raw)
In-Reply-To: <1398713740-24446-1-git-send-email-peter.maydell@linaro.org>

Am 28.04.2014 21:35, schrieb Peter Maydell:
> The test_path binary is (unlike the other test binaries in tests/tcg)
> actually intended to be compiled with the same compiler used to build
> the main QEMU executables. It actually #includes a number of the
> QEMU source files in an attempt to unit-test the util/path.c functions,
> and so if it is not compiled with the same compiler used by configure
> to set CONFIG_ settings then it is liable to fail to build.
> Fix the makefile to build it with CC, not CC_I386, and fix the test
> itself not to include a lot of unnecessary trace related source
> files which cause the build to fail if the trace backend is anything
> other than 'simple'.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> The particular build failure you usually hit is that CC is an
> x86-64 compiler supporting __int128_t whereas CC_I386 does not,
> and then the code in the headers using those types blows up.
> 
> The whole attempt to unit test by compiling bits of the .c files
> seems terribly fragile to me; this is the only test we have that
> does it, so if anybody has a better approach to testing these path.c
> functions I'd like to know.
> 
> Stefan, you added the trace .c files in commit 6d4adef48dd6bb but
> I can't work out why they're needed -- the test builds fine for
> me without them whether we configured using the default or simple
> backends, and it definitely doesn't compile if we used the default
> backend and the test includes the trace .c files...

Before my commit, a trace.c was included which was no longer available,
so I simply replaced it by its successor (which needed additional trace
.c files). I can confirm that removing those trace files also works.
That's of course a better solution.

Stefan





      parent reply	other threads:[~2014-04-28 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 19:35 [Qemu-trivial] [PATCH] tests/tcg: Fix compilation of test_path Peter Maydell
2014-04-28 19:45 ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2014-04-28 20:49 ` Stefan Weil [this message]

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=535EBED2.7030705@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=mjt@tls.msk.ru \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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).