All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest
@ 2015-10-27 16:29 marcandre.lureau
  2015-10-27 18:37 ` Michael S. Tsirkin
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: marcandre.lureau @ 2015-10-27 16:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, mst

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>
---
 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

^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [Qemu-devel] [PATCH 3/3] exec: silence hugetlbfs warning under qtest
@ 2015-11-16 17:23 marcandre.lureau
  2015-11-18  9:02 ` [Qemu-devel] [PATCH] " marcandre.lureau
  0 siblings, 1 reply; 21+ messages in thread
From: marcandre.lureau @ 2015-11-16 17:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, mst

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-11-24 15:29 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.