From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 09/11] eal/pci: replace SYSFS_PCI_DEVICES with pci_get_sysfs_path() Date: Thu, 12 May 2016 18:10:07 +0200 Message-ID: <1676568.i7hclo24i5@xps13> References: <1462904011-29838-1-git-send-email-viktorin@rehivetech.com> <9394515.aZP2i1zDQW@xps13> <20160512174636.3312061d@pcviktorin.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, David Marchand , Bruce Richardson To: Jan Viktorin Return-path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id EB1FE58F3 for ; Thu, 12 May 2016 18:10:09 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id g17so144392849wme.1 for ; Thu, 12 May 2016 09:10:09 -0700 (PDT) In-Reply-To: <20160512174636.3312061d@pcviktorin.fit.vutbr.cz> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-05-12 17:46, Jan Viktorin: > On Thu, 12 May 2016 17:41:22 +0200 > Thomas Monjalon wrote: > > 2016-05-10 20:13, Jan Viktorin: > > > + orig = pci_get_sysfs_path(); > > > + ret = setenv("SYSFS_PCI_DEVICES", "My Documents", 1); > > > > Oh no! > > Not sure about your reaction... MS reference... ;) > > > > > + 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? > > Because I've set it to "My Documents" and want to be sure that the > pci_get_sysfs_path() returns the new path instead of the default > one. > > Perhaps, !strcmp(path, "My Documents") would be better here... No, just rethink the variable names maybe.