[dpdk-dev] [PATCH v2 09/11] eal/pci: replace SYSFS_PCI_DEVICES with pci_get_sysfs_path()
Thomas Monjalon
thomas.monjalon at 6wind.com
Thu May 12 17:41:22 CEST 2016
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.
More information about the dev
mailing list