From patchwork Tue Apr 12 11:55:29 2016 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: 8809741 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C96BDC0553 for ; Tue, 12 Apr 2016 11:58:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 207142035B for ; Tue, 12 Apr 2016 11:58:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7587E20148 for ; Tue, 12 Apr 2016 11:58:14 +0000 (UTC) Received: from localhost ([::1]:47896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apwxR-0000ov-Nk for patchwork-qemu-devel@patchwork.kernel.org; Tue, 12 Apr 2016 07:58:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apwvI-0004zl-Qh for qemu-devel@nongnu.org; Tue, 12 Apr 2016 07:56:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apwvH-0008R6-8E for qemu-devel@nongnu.org; Tue, 12 Apr 2016 07:56:00 -0400 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:33224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apwvH-0008R0-1z for qemu-devel@nongnu.org; Tue, 12 Apr 2016 07:55:59 -0400 Received: by mail-qg0-x230.google.com with SMTP id j35so13221553qge.0 for ; Tue, 12 Apr 2016 04:55:58 -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-transfer-encoding; bh=7Na51TeTnKsMqUoqMYv4alBe+iz49IS6sje9+XYrOhs=; b=vS/NXbCdTbzcxfYPCjTWAbPRlWUJuP9Yu5v5q5PVOvZUSsEbUeHd260/OEp1Z0sqmV kadVkULu01PlqO811WAfsVTrYGgcYqHB6nelPiuA8cCfm9QnmcIJyFoVi5DpjdDOKH/X E38Zc1gPaMJIVzI6WH32BHHG0R6W1h/6CnHk2Amc63zub3lWf64mVfHJGUoX7eaWa82A jmTnV3s5Ove/mFVzd5bgPlGuS8vGlj1TMWnG9esuwxjRhB2EJuTk5k6MLq7wBNclvBiF v8vdAfoNlI6SRZEyk8NT03O8CBs9Ofq2yoqdZH+g9hAyahw3xQ2vQwC+Diqkze/DiPm8 0Vig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7Na51TeTnKsMqUoqMYv4alBe+iz49IS6sje9+XYrOhs=; b=EmM34GJnIfxbZuahJGP/wI3zMWP4nh7Flocbsq8rV4VCOylT6VxPHdpPcOoeCFCYrH QLO/U1sj6aH0bDNVPtPaw6stdwHvCtxm3aV0qNKZFwRZsSQhYE3pPi85ZHpyiBrM6DuS pN7kFAYkpsHQ0FP+kBijNnYFvwk6l4iZcn4ZLpLWFe9dumXw5bV9B4D85o5WrRWPVDN5 knrW8MWA95UaAM4I6tW/9Y14R9HCB8LY6UxNhmPZEDQYgL+dgkYIbj0IyHDHylkZ+8IU EYmkoJJGJXlDEkfKEG4g3cvG0nFpmNiofrwb++CpBMn18wcAk7aSq9u1aFDucgjggqUn JT9g== X-Gm-Message-State: AOPr4FXF71Fvzlfb08H64n4L/TrfNV7+uTTQILx5y92xSKsHZztbxD3v88IIkMBg40K5YQ== X-Received: by 10.140.102.193 with SMTP id w59mr3144443qge.58.1460462158501; Tue, 12 Apr 2016 04:55:58 -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 a6sm2096224qhd.33.2016.04.12.04.55.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Apr 2016 04:55:57 -0700 (PDT) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Tue, 12 Apr 2016 13:55:29 +0200 Message-Id: <1460462129-17363-10-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1460462129-17363-1-git-send-email-marcandre.lureau@redhat.com> References: <1460462129-17363-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c04::230 Subject: [Qemu-devel] [PATCH 9/9] tests: use memfd in vhost-user-test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc-André Lureau This will exercise the memfd memory backend and should generally be better for testing than memory-backend-file (thanks to anonymous files and sealing). Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 6961596..6ef6c48 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -32,8 +32,8 @@ #endif #define QEMU_CMD_ACCEL " -machine accel=tcg" -#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_MEM " -m %d -object memory-backend-memfd,id=mem,size=%dM"\ + " -numa node,memdev=mem" #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,romfile=./pc-bios/pxe-virtio.rom" @@ -383,12 +383,12 @@ static TestServer *test_server_new(const gchar *name) return server; } -#define GET_QEMU_CMD(s) \ - g_strdup_printf(QEMU_CMD, 512, 512, (root), (s)->chr_name, \ +#define GET_QEMU_CMD(s) \ + g_strdup_printf(QEMU_CMD, 512, 512, (s)->chr_name, \ (s)->socket_path, (s)->chr_name) -#define GET_QEMU_CMDE(s, mem, extra, ...) \ - g_strdup_printf(QEMU_CMD extra, (mem), (mem), (root), (s)->chr_name, \ +#define GET_QEMU_CMDE(s, mem, extra, ...) \ + g_strdup_printf(QEMU_CMD extra, (mem), (mem), (s)->chr_name, \ (s)->socket_path, (s)->chr_name, ##__VA_ARGS__) static gboolean _test_server_free(TestServer *server)