All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: QEMU <qemu-devel@nongnu.org>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] exec: silence hugetlbfs warning under qtest
Date: Tue, 17 Nov 2015 22:32:32 +0100	[thread overview]
Message-ID: <CAJ+F1CJpDr9S3F6sN4vEK+XJkC0-D_E=49cutGAYkYDoC5H2Lw@mail.gmail.com> (raw)
In-Reply-To: <1447694618-17177-3-git-send-email-marcandre.lureau@redhat.com>

nack, this isn't enough to silence the warning, as vhost-user-test
uses  -machine accel=tcg

On Mon, Nov 16, 2015 at 6:23 PM,  <marcandre.lureau@redhat.com> wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> vhost-user-test prints a warning. A test should not need to run on
> hugetlbfs, let's silence the warning under qtest. Unfortunately, the
> condition can't check on qtest_enabled() or qtest_driver() since they
> are initialized later. Moving configure_accelerator() earlier is
> problematic, as the memory regions aren't yet fully set up and
> vhost-user-test fails.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  exec.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/exec.c b/exec.c
> index b09f18b..3edc582 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1184,6 +1184,7 @@ void qemu_mutex_unlock_ramlist(void)
>  static long gethugepagesize(const char *path, Error **errp)
>  {
>      struct statfs fs;
> +    const char *p;
>      int ret;
>
>      do {
> @@ -1196,8 +1197,11 @@ static long gethugepagesize(const char *path, Error **errp)
>          return 0;
>      }
>
> -    if (fs.f_type != HUGETLBFS_MAGIC)
> +    p = qemu_opt_get(qemu_get_machine_opts(), "accel");
> +    if (g_strcmp0(p, "qtest") &&
> +        fs.f_type != HUGETLBFS_MAGIC) {
>          fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path);
> +    }
>
>      return fs.f_bsize;
>  }
> --
> 2.5.0
>
>



-- 
Marc-André Lureau

  parent reply	other threads:[~2015-11-17 21:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 17:23 [Qemu-devel] [PATCH 1/3] tests: define qtest-obj-y before using it marcandre.lureau
2015-11-16 17:23 ` [Qemu-devel] [PATCH 2/3] tests: re-enable vhost-user-test marcandre.lureau
2015-11-16 17:23 ` [Qemu-devel] [PATCH 3/3] exec: silence hugetlbfs warning under qtest marcandre.lureau
2015-11-16 21:50   ` Michael S. Tsirkin
2015-11-17 21:32   ` Marc-André Lureau [this message]
2015-11-18  8:32     ` Markus Armbruster
2015-11-18  9:02   ` [Qemu-devel] [PATCH] " marcandre.lureau
2015-11-18 20:49     ` Michael S. Tsirkin
2015-11-23 17:40       ` Paolo Bonzini
2015-11-23 17:46         ` Daniel P. Berrange
2015-11-23 17:49           ` Daniel P. Berrange
2015-11-23 18:01         ` Marc-André Lureau
2015-11-23 18:10           ` Daniel P. Berrange
2015-11-24 14:10             ` Michael S. Tsirkin
2015-11-24 14:19               ` Daniel P. Berrange
2015-11-24 14:25                 ` Michael S. Tsirkin
2015-11-24 14:30                   ` Daniel P. Berrange
2015-11-24 14:30                   ` Paolo Bonzini
2015-11-24 15:29                     ` Michael S. Tsirkin
2015-11-24 15:09                 ` Markus Armbruster
2015-11-24 14:12           ` Michael S. Tsirkin

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='CAJ+F1CJpDr9S3F6sN4vEK+XJkC0-D_E=49cutGAYkYDoC5H2Lw@mail.gmail.com' \
    --to=marcandre.lureau@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.