From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyNVO-0002p6-Cc for qemu-devel@nongnu.org; Mon, 16 Nov 2015 12:23:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyNVN-00084l-I4 for qemu-devel@nongnu.org; Mon, 16 Nov 2015 12:23:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyNVN-00084h-Cb for qemu-devel@nongnu.org; Mon, 16 Nov 2015 12:23:49 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 0C4EAAAA for ; Mon, 16 Nov 2015 17:23:49 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Mon, 16 Nov 2015 18:23:38 +0100 Message-Id: <1447694618-17177-3-git-send-email-marcandre.lureau@redhat.com> In-Reply-To: <1447694618-17177-1-git-send-email-marcandre.lureau@redhat.com> References: <1447694618-17177-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 3/3] exec: silence hugetlbfs warning under qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , mst@redhat.com From: Marc-Andr=C3=A9 Lureau 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=C3=A9 Lureau --- 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; =20 do { @@ -1196,8 +1197,11 @@ static long gethugepagesize(const char *path, Erro= r **errp) return 0; } =20 - if (fs.f_type !=3D HUGETLBFS_MAGIC) + p =3D qemu_opt_get(qemu_get_machine_opts(), "accel"); + if (g_strcmp0(p, "qtest") && + fs.f_type !=3D HUGETLBFS_MAGIC) { fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path); + } =20 return fs.f_bsize; } --=20 2.5.0