From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 4050D567C for ; Wed, 18 Jan 2017 08:28:42 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id r126so233429590wmr.0 for ; Tue, 17 Jan 2017 23:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=ia1IR3agx5of/KO4ADPbRDogEjt3kRH7EjcrDR+76ko=; b=skAsdjurrCCuoyvml8JylRhMB8rqzx4Sj2mTy8uHE8A0Ce7MXTnUyiSvwJjhGZe2C8 OqC0zcI91aCXCWcXVqictsU6b3ZbQKoq4aQIEg3lMeCroj5l+9LayPewjILqurp3kjLy gLmQ6raOn7ndAxEJc0yh7T5JwCT1FrLbjyF6BLVZHUDCK46aiXBPHwShIuFPULj4yLFH 2EEWkHzm5iOIqLIKV6oDEz7pOsQuCs2eWatuJ+dr0yQdGl+LqRbsBkqmxFqTKufbZ76r tAlHA6I72jhBoGmIR8EbeSLbCiA6IkMos1RcdTCOWDs+Fl9z9orglStjpT1nj1qShY+f gPbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=ia1IR3agx5of/KO4ADPbRDogEjt3kRH7EjcrDR+76ko=; b=dRK7wFaqzNvfpBGmBTT0TkF/nprM4P7xpr/uTOSAZa1s3iZGNDPDpbWoYYOk6CZ2SS tGHPoShEr4IOlmq2L3K610cWyFx9IHJjV2uDxrTuNk2w5ajwUc7JLzutlY3zXoPz2CYd L3UVWazHzuzG926GtLpvSpYdE8ey7Bf+zdDBG7aCs/8oWZXrfsoeSazR7yu+mKwwkL6B 9Zpf9wfirXQ6WEcidhaI+xG0XbygC14N31zhDpXMQx8Tll9zNlKkEdPo61CSnSYHflDZ kEanODJDa7BeSqI3ftLCML9Dy5wxFDFJXJTz58nn7TT0enVmD55UYnJsLG6K06LEKeEm 6sjQ== X-Gm-Message-State: AIkVDXLhqiWSUPHN3LWTPNvzjbTHR8Y/2qzpIhvgOJncDvZ99vh9rs4amSQEje9tfGDxeXQf X-Received: by 10.28.152.137 with SMTP id a131mr20687364wme.139.1484724521851; Tue, 17 Jan 2017 23:28:41 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id y65sm39838332wmb.5.2017.01.17.23.28.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 23:28:41 -0800 (PST) From: Thomas Monjalon To: Shreyansh Jain Cc: dev@dpdk.org Date: Wed, 18 Jan 2017 08:28:39 +0100 Message-ID: <2193672.0sRautH3mz@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1484647774-28984-1-git-send-email-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8 2/9] test: add basic bus infrastructure tests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2017 07:28:42 -0000 2017-01-18 06:56, Shreyansh Jain: > > > > +/* Bus list exposed */ > > > > +extern struct rte_bus_list rte_bus_list; > > > > > > I think it should be possible to write a test without the real list > > > of registered bus. > > > > Yes, it is possible. I just modeled it on test_pci assuming that is a kind of > > expected/standard. But, it seems probably it is not. I will change the tests. > > After sending out this mail I realized the real reason for using the actual lists. Functions like rte_eal_pci_register (for PCI) or rte_bus_register (for Bus), use global lists for registration. Test cases calls these functions for registering dummy device/bus. Why access to the bus list is externally required? I feel there is something wrong here. It should be private in PCI. > One way is to not worry about adding these test/dummy devices/buses to original list as they would be unregistered anyway. But, risk is of impacting running list assuming multiple cases need to be run from same application/binary context. > > Another way is to rewrite these functions locally in test case, but that also means not testing these global registration/de-registration functions. > > Former method would continue to have symbols exported. Later is not testing some entry/exit functions of a sub-system. > > You still interested in this change? I would prefer you do not lose time with testing at this stage.