From patchwork Fri Feb 23 23:16:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 129500 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1144518lja; Fri, 23 Feb 2018 15:16:20 -0800 (PST) X-Google-Smtp-Source: AH8x224GcXBoVgHgpkq29kSjFSvl3u855CTaEIyzd2qCwT4YB4gIJQxxVZn5EEDF0rTez5Ch9ba4 X-Received: by 10.157.64.225 with SMTP id t30mr2242221oti.293.1519427780598; Fri, 23 Feb 2018 15:16:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519427780; cv=none; d=google.com; s=arc-20160816; b=WeOZj0ePp2rf1edAr7EmLhHXwvisWmxzXuabNKmgNjVjgC2ZILkf9QnGBuOW57Pf/v o86Kd0TG13MhtGTfEU7wOgh/j283rIUSsxPhNgp88bil3plCfRV+k52A/x08Wb2gQ3VH vzGZ0MEY8I+uQkfXFbdGAWR7zjc+VkU3CnFOt5XhUdtjWvNz0Jvyf5rMVe9Zs7Kmrw0E Bzxse06ilqhh5IAyzFPrQbkFBBq0JEy85KNbnzKamJd4EXGJVC5fmo36KbYz2xmvmgXq xFLjOnY15WxQLpD2g1O1AP5cYTrLoRwCvW+JnrFkaalMI6fQd90sq4f3Ya7KovSfv/by Z3pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:references :in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=VYLpR/KX51jrVhSUTgdvA1Gr4lAMjnb7O+W06oS58Pk=; b=jhtR1xF3azjR/7rkjH3U25cg/tkDLCx08Hm89xom/McmxmlURVS31eH9+bQIl1jNy1 x78mlApJu8PzGnYh3SMKiZTPt8dt8pvQ6jfS/i1UO9pOFOcJYrMBykds/QKZevVwHRqJ oiUOgEKCk11rXvdO48lrv4NRZhjAiLbGTZMZvRNvo/qJbSTxtg4WZowYt2nthV2wX/lQ nr+piTbw/9uyEAbAd94qlMPm5/19DpT+P56/z6aBExDvOTagJmlHUPqpKOADIO60JBy5 /OF+1r1uJlM2whVvvLB+SNrAU1B55N322eZysOS9irt6P59zFDOo5j6HxjoeAOHmpySZ M98A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id t189si1033596oib.403.2018.02.23.15.16.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 15:16:20 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 611FF757D4; Fri, 23 Feb 2018 23:16:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E9645C25A; Fri, 23 Feb 2018 23:16:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D09CB4A46C; Fri, 23 Feb 2018 23:16:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1NNGFP8017941 for ; Fri, 23 Feb 2018 18:16:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7003B5D965; Fri, 23 Feb 2018 23:16:15 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-116-122.phx2.redhat.com [10.3.116.122]) by smtp.corp.redhat.com (Postfix) with ESMTP id F188D5D9C5; Fri, 23 Feb 2018 23:16:14 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 23 Feb 2018 18:16:08 -0500 Message-Id: <5acbdcd616caf430445683c401137e24ebfd5439.1519427518.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] test: Implement virConnectListAllNodeDevices X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 23 Feb 2018 23:16:19 +0000 (UTC) Signed-off-by: Cole Robinson --- src/test/test_driver.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: John Ferlan diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 39784c9fa..844e99dd7 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5385,6 +5385,18 @@ testNodeListDevices(virConnectPtr conn, cap, names, maxnames); } +static int +testConnectListAllNodeDevices(virConnectPtr conn, + virNodeDevicePtr **devices, + unsigned int flags) +{ + testDriverPtr driver = conn->privateData; + + virCheckFlags(VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP, -1); + + return virNodeDeviceObjListExport(conn, driver->devs, devices, + NULL, flags); +} static virNodeDevicePtr testNodeDeviceLookupByName(virConnectPtr conn, const char *name) @@ -7022,6 +7034,7 @@ static virStorageDriver testStorageDriver = { }; static virNodeDeviceDriver testNodeDeviceDriver = { + .connectListAllNodeDevices = testConnectListAllNodeDevices, /* 4.1.0 */ .connectNodeDeviceEventRegisterAny = testConnectNodeDeviceEventRegisterAny, /* 2.2.0 */ .connectNodeDeviceEventDeregisterAny = testConnectNodeDeviceEventDeregisterAny, /* 2.2.0 */ .nodeNumOfDevices = testNodeNumOfDevices, /* 0.7.2 */