All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: marcandre.lureau@redhat.com, qemu-devel@nongnu.org,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest
Date: Mon, 09 Nov 2015 08:50:28 +0100	[thread overview]
Message-ID: <87oaf3pq63.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <20151108185953-mutt-send-email-mst@redhat.com> (Michael S. Tsirkin's message of "Sun, 8 Nov 2015 19:02:21 +0200")

"Michael S. Tsirkin" <mst@redhat.com> writes:

> On Tue, Oct 27, 2015 at 05:29:43PM +0100, 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.
>> 
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Any idea what's the best way to address this?

Can we reorder things so that qtest_enabled() can be used?

> Is poking at environment like this appropriate?

I'm afraid it isn't.  QTEST_QEMU_BINARY can be in the environment even
when you're not running under qtest.

> Maybe a command line flag to silence the warning?

There's -qtest and -qtest-log.  I guess keying on those would be less
unclean than QTEST_QEMU_BINARY.

>> ---
>>  exec.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/exec.c b/exec.c
>> index 8af2570..d9c231d 100644
>> --- a/exec.c
>> +++ b/exec.c
>> @@ -1194,8 +1194,9 @@ static long gethugepagesize(const char *path, Error **errp)
>>          return 0;
>>      }
>>  
>> -    if (fs.f_type != HUGETLBFS_MAGIC)
>> +    if (fs.f_type != HUGETLBFS_MAGIC && !getenv("QTEST_QEMU_BINARY")) {
>>          fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path);
>> +    }
>>  
>>      return fs.f_bsize;
>>  }
>> -- 
>> 2.4.3

  reply	other threads:[~2015-11-09  7:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 16:29 [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest marcandre.lureau
2015-10-27 18:37 ` Michael S. Tsirkin
2015-10-29  9:10 ` Michael S. Tsirkin
2015-11-08 17:02 ` Michael S. Tsirkin
2015-11-09  7:50   ` Markus Armbruster [this message]
2015-11-12 11:54 ` Michael S. Tsirkin
2015-11-16 17:23 [Qemu-devel] [PATCH 3/3] " marcandre.lureau
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=87oaf3pq63.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.