From patchwork Tue Jul 10 21:46:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 141657 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4377453ljj; Tue, 10 Jul 2018 14:46:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfab4ftwDZOhAQFukoFynJ2nMyT0DoqFWyDdik171Hlbta/mgaZfkv3SkFJw92g2TMD058n X-Received: by 2002:aed:3ec4:: with SMTP id o4-v6mr24681079qtf.252.1531259185473; Tue, 10 Jul 2018 14:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531259185; cv=none; d=google.com; s=arc-20160816; b=yg8mtJA+BazDOhVmWAxPEZ+CsPSP22brmTOj/CK0mwm7lNZRYChnuXLm/i2hty9brO hUjVT0wHWBPi4VWIuMWJbTzW1lCJVTCr2AhbTImABFIeicvPhAvi/eBNGDqom7o6PR0I W2JfwihNpFPIyChcZMnM4KH8N5LZblDs2w+9GryaVy6Kk/0TduhOV7LAaYExnfKKbdEG mEkt4iYKGuj3TSMPfhyJbiy3HP7l6sFQ2edkHU+DlkzyhJL9UfgvBH/hKnPCeer8I4Z7 ymm6l/BVqeNCtfGTbHgM2h4617zFCRcu3oA3E9lIcRWYXmlC2RX+4hlwqC2QJpo91A7b 3X6Q== 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:cc:references:in-reply-to:references :in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=LJdyLB6fnKb4gT2BHQUPjLVc3T3RXlI5n+luN1FknVo=; b=sQSo7quOclHWQdtDNKMTHTOad1OkXIFM6Fj/QcqDJa1PutfhAZXTMovbTI2NSWWV2n XtFU2rngxIJJTOferP1dG9tF0vRrzKYUmpkhNVv5OFpfp2ZQ4RyYkGB9hKVx55jZgFlQ 2arbXiGarqB8qhCtMtH1+G3Phw9h2IGBtsdJ5gkJ7YUJp3GMWEuyqAJXxKDOuDvPnh91 40a6UJ16jTwfW84+FqYDFpDI7M+fU5r+bhxGAMy62Fk5DkfUJn+M17PadnoV14Ct1EtB xI5u9peiJhiZ6QgIO3rf6dID+5YRWLmfT75d8PeqxXPiqk33yPnFOZrTNuOr9TtKGtk4 8ovQ== 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 e4-v6si1691966qtc.150.2018.07.10.14.46.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jul 2018 14:46:25 -0700 (PDT) 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-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D1C794E90E; Tue, 10 Jul 2018 21:46:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 803D61001949; Tue, 10 Jul 2018 21:46:23 +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 3077218037EF; Tue, 10 Jul 2018 21:46:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6ALk8Y7023419 for ; Tue, 10 Jul 2018 17:46:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id B988D2156700; Tue, 10 Jul 2018 21:46:07 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.bos.redhat.com (dhcp-17-157.bos.redhat.com [10.18.17.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id 930DB2156891; Tue, 10 Jul 2018 21:46:07 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Tue, 10 Jul 2018 17:46:02 -0400 Message-Id: <34dec2cf3568a43193be17920ee37ca97a3dff21.1531259066.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: eskultet@redhat.com Subject: [libvirt] [PATCH v2 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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 10 Jul 2018 21:46:24 +0000 (UTC) Signed-off-by: Cole Robinson --- src/test/test_driver.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7374c83eaa..3bc79bf358 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5381,6 +5381,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) @@ -7017,6 +7029,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 */