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 6A3107E93 for ; Thu, 12 May 2016 17:41:24 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id a17so143148937wme.0 for ; Thu, 12 May 2016 08:41:24 -0700 (PDT) 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=IwnOMEnWQilxElHX1T+oRb09y0+ZtcI+kcBNAoTzby0=; b=hlDiaDEUo31bSdVjfVPBUKBaU3ORFPv/vBjG1GgS9md9cX7Of+8aiW1PrfMaJMXqSB nrqMwSu1aKsITrkCUJ5HdyLqWpIWIE0YEBI6yuLQbroa7SpP5Rj8vphE7W/gzOdkLghp HnEtCJu/nLeCHqiBWU4yktaWxo6bWS7+72dJBMTGWUkgzycm4YgXvvMCXIf6skBlZ5/G 18ZZduakgT3zwC0P6sUrKt1C259HDzFA3XQHBQDM+f3CF/L7nMXtxY2QayPhjrBnp9Rm hGuQoXLWS46P25Q9Zx3Omrv6QZIwcrWCULsAR9gN9D8s+Uw+kYHU2Sb2o7J6ugT1wKCI WnMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=IwnOMEnWQilxElHX1T+oRb09y0+ZtcI+kcBNAoTzby0=; b=E5Un50ZOSJxMYajgdD1UV09s8nANY+IwpC4/9rJJ6U7+PS4/JDke2fnwlo473rc1Pt JM2sMY96OkE+KtnxQUeh6Ia8VFuKkUmyp+fkjs1xRTNrptsbulgZuB/yCWlsT+jlNIYb fwZtBfSry614i9VM7Zd1TxBghwSA6K4klwnoGxYoTxoPzeO7pFR/z+w3foopkm8ULOqt xAE+Ue5iV+YaquigYay4cFEtKLZMoIY8PHqKbDPvsnptxUEi1DmwE2KUIH210dObz6DG fX6zYK+6QnxdOc0Hp+OUOIp/RUkPrIzb69SyXojLM1fz7CJwKR0USEGP8D2MLZZ8ooCZ lOuQ== X-Gm-Message-State: AOPr4FWZe3b7sWN3aS8WQsI0kYBsw00MW97WBrI0/Hwh+uFPGX3f8CqOyqroDqsEmdQpSSkw X-Received: by 10.28.10.7 with SMTP id 7mr6842304wmk.43.1463067684254; Thu, 12 May 2016 08:41:24 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id 8sm42007684wms.14.2016.05.12.08.41.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 May 2016 08:41:23 -0700 (PDT) From: Thomas Monjalon To: Jan Viktorin Cc: dev@dpdk.org, David Marchand , Bruce Richardson Date: Thu, 12 May 2016 17:41:22 +0200 Message-ID: <9394515.aZP2i1zDQW@xps13> User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1462904011-29838-10-git-send-email-viktorin@rehivetech.com> References: <1462904011-29838-1-git-send-email-viktorin@rehivetech.com> <1462904011-29838-10-git-send-email-viktorin@rehivetech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 09/11] eal/pci: replace SYSFS_PCI_DEVICES with pci_get_sysfs_path() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2016 15:41:24 -0000 2016-05-10 20:13, Jan Viktorin: > The SYSFS_PCI_DEVICES is a constant that makes the PCI testing difficult as > it points to an absolute path. We remove using this constant and introducing > a function pci_get_sysfs_path that gives the same value. However, the user can > pass a SYSFS_PCI_DEVICES env variable to override the path. It is now possible > to create a fake sysfs hierarchy for testing. Yeah! > + orig = pci_get_sysfs_path(); > + ret = setenv("SYSFS_PCI_DEVICES", "My Documents", 1); Oh no! > + TEST_ASSERT_SUCCESS(ret, "Failed setenv to My Documents"); > + > + path = pci_get_sysfs_path(); > + TEST_ASSERT(strcmp(orig, path), > + "orig must be different from path: " I missed something here. Why different? > +DPDK_16.07 { > + global: > + > + pci_get_sysfs_path; > +} DPDK_16.04; I don't know why but we are used to put a blank line after the last symbol.