From patchwork Thu Sep 24 16:22:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 522426 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 951C0140271 for ; Fri, 25 Sep 2015 02:31:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Dr0PhaeX; dkim-atps=neutral Received: from localhost ([::1]:45933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf9QO-0005kR-Gh for incoming@patchwork.ozlabs.org; Thu, 24 Sep 2015 12:31:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf9In-0001T1-8b for qemu-devel@nongnu.org; Thu, 24 Sep 2015 12:23:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf9Ih-0005OI-Sx for qemu-devel@nongnu.org; Thu, 24 Sep 2015 12:23:21 -0400 Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:36089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf9Ih-0005O3-Ik for qemu-devel@nongnu.org; Thu, 24 Sep 2015 12:23:15 -0400 Received: by qkcf65 with SMTP id f65so31714868qkc.3 for ; Thu, 24 Sep 2015 09:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=UQs99GZsreBuxI2xwa04pXn/KDWwAGgxe1N3u+p9Jk0=; b=Dr0PhaeXGZm94a3gyta7PtQLvgD1PyUQbeZQ6wMCz2gAA34JCt7ZNh0y0PMhf533Du NHpDnsF7oTpmB4t4pH4yu5WYLuOKCzRdgpfNI7vO8mufCk8gVzyKAO3g5qqFk9CpKSvz K+n6x0sSbx1LRJFjofuemw/rPLe7sXmlVd2UoiPpvL71oDu7VpGpnUyEWmBS/TmIXMPh +bym8IMmBINSAXMKhx1lfl6f367Z9g2vJZVNGXVmdIIjoaWHhH0Jcd0Nr0tFon06ghIE 8L+MLWehavkvy3yp/waOwC/0ggS4DnT5HKmk4Sw0P9z7PUTJoTolmzz9SGFjlBvd7zRi w7zg== X-Received: by 10.55.17.12 with SMTP id b12mr713384qkh.69.1443111795325; Thu, 24 Sep 2015 09:23:15 -0700 (PDT) Received: from localhost (bne75-h02-31-39-163-232.dsl.sta.abo.bbox.fr. [31.39.163.232]) by smtp.gmail.com with ESMTPSA id c188sm4770161qka.37.2015.09.24.09.23.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2015 09:23:14 -0700 (PDT) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Thu, 24 Sep 2015 18:22:19 +0200 Message-Id: <1443111741-4736-20-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1443111741-4736-1-git-send-email-marcandre.lureau@redhat.com> References: <1443111741-4736-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c09::236 Cc: haifeng.lin@huawei.com, mst@redhat.com, thibaut.collet@6wind.com, jasowang@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [Qemu-devel] [PATCH v5 19/21] vhost-user-test: learn to tweak various qemu arguments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Marc-André Lureau Add a new macro to make the qemu command line with other values of memory size, and specific chardev id. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 8daef01..b2ac454 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -37,10 +37,10 @@ #endif #define QEMU_CMD_ACCEL " -machine accel=tcg" -#define QEMU_CMD_MEM " -m 512 -object memory-backend-file,id=mem,size=512M,"\ +#define QEMU_CMD_MEM " -m %d -object memory-backend-file,id=mem,size=%dM,"\ "mem-path=%s,share=on -numa node,memdev=mem" -#define QEMU_CMD_CHR " -chardev socket,id=chr0,path=%s" -#define QEMU_CMD_NETDEV " -netdev vhost-user,id=net0,chardev=chr0,vhostforce" +#define QEMU_CMD_CHR " -chardev socket,id=%s,path=%s" +#define QEMU_CMD_NETDEV " -netdev vhost-user,id=net0,chardev=%s,vhostforce" #define QEMU_CMD_NET " -device virtio-net-pci,netdev=net0 " #define QEMU_CMD_ROM " -option-rom ../pc-bios/pxe-virtio.rom" @@ -389,9 +389,13 @@ static TestServer *test_server_new(const gchar *name) return server; } -#define GET_QEMU_CMD(s) \ - g_strdup_printf(QEMU_CMD, (hugefs), (s)->socket_path) +#define GET_QEMU_CMD(s) \ + g_strdup_printf(QEMU_CMD, 512, 512, (hugefs), \ + (s)->chr_name, (s)->socket_path, (s)->chr_name) +#define GET_QEMU_CMDE(s, mem, extra, ...) \ + g_strdup_printf(QEMU_CMD extra, (mem), (mem), (hugefs), \ + (s)->chr_name, (s)->socket_path, (s)->chr_name, ##__VA_ARGS__) static void test_server_free(TestServer *server) {