From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so2.wedos.net (wes1-so2.wedos.net [46.28.106.16]) by dpdk.org (Postfix) with ESMTP id 28182803B for ; Tue, 10 May 2016 20:15:51 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so2.wedos.net (Postfix) with ESMTPSA id 3r46r66KZ6z1Nx; Tue, 10 May 2016 20:15:50 +0200 (CEST) From: Jan Viktorin To: dev@dpdk.org Cc: Jan Viktorin , Thomas Monjalon , David Marchand , Bruce Richardson Date: Tue, 10 May 2016 20:13:20 +0200 Message-Id: <1462904011-29838-1-git-send-email-viktorin@rehivetech.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1461935496-20367-1-git-send-email-viktorin@rehivetech.com> References: <1461935496-20367-1-git-send-email-viktorin@rehivetech.com> Subject: [dpdk-dev] [PATCH v2 00/11] Include resources in tests 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: Tue, 10 May 2016 18:15:51 -0000 Hello, another round. The code now looks better. Brief introduction: This patch set introduces a mechanism to include a resource (in general a blob) into the test binary. This allows to make tests less dependent on the target testing environment. The first use case is testing of PCI bus scan by changing the hard-coded path (/sys/bus/pci/devices) to something different and provide a fake tree of devices with the test. (CC: B. Richardson (accidently avoided in v1).) --- v1: * included 5 patches improving the PCI tests * fixed using of non-existing RTE_INIT macro v2: * Makefile macro resource renamed to linked_resource * introduced macro linked_tar_resource * added more comments * clarified relation between REGISTER_LINKED_RESOURCE and the Makefile * untar is checked to not loop infinitely * improved commit messages * objcopy params extracted to a separated patcha (missing tile and ppc) * few random bits (usually suggested by T. Monjalon) * included a note about the new dependency libarchive in the particular commit Jan Viktorin (11): app/test: introduce resources for tests mk: define objcopy-specific target and arch app/test: support resources externally linked app/test: add functions to create files from resources app/test: support resources archived by tar app/test: use linked list to store PCI drivers app/test: extract test_pci_setup and test_pci_cleanup app/test: convert current pci_test into a single test case eal/pci: replace SYSFS_PCI_DEVICES with pci_get_sysfs_path() app/test: scan PCI bus using a fake sysfs app/test: do not dump PCI devices in blacklist test app/test/Makefile | 31 +++ app/test/resource.c | 296 +++++++++++++++++++++ app/test/resource.h | 135 ++++++++++ app/test/test_pci.c | 148 +++++++++-- .../bus/pci/devices/0000:01:00.0/class | 1 + .../bus/pci/devices/0000:01:00.0/config | Bin 0 -> 64 bytes .../devices/0000:01:00.0/consistent_dma_mask_bits | 1 + .../bus/pci/devices/0000:01:00.0/device | 1 + .../bus/pci/devices/0000:01:00.0/dma_mask_bits | 1 + .../bus/pci/devices/0000:01:00.0/enable | 1 + .../bus/pci/devices/0000:01:00.0/irq | 1 + .../bus/pci/devices/0000:01:00.0/modalias | 1 + .../bus/pci/devices/0000:01:00.0/msi_bus | 1 + .../bus/pci/devices/0000:01:00.0/numa_node | 1 + .../bus/pci/devices/0000:01:00.0/resource | 13 + .../bus/pci/devices/0000:01:00.0/sriov_numvfs | 1 + .../bus/pci/devices/0000:01:00.0/sriov_totalvfs | 1 + .../bus/pci/devices/0000:01:00.0/subsystem_device | 1 + .../bus/pci/devices/0000:01:00.0/subsystem_vendor | 1 + .../bus/pci/devices/0000:01:00.0/uevent | 6 + .../bus/pci/devices/0000:01:00.0/vendor | 1 + app/test/test_resource.c | 132 +++++++++ drivers/net/szedata2/rte_eth_szedata2.c | 2 +- drivers/net/virtio/virtio_pci.c | 2 +- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 6 + lib/librte_eal/common/eal_common_pci.c | 13 + lib/librte_eal/common/include/rte_pci.h | 2 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 6 +- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 7 +- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 2 +- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 6 + mk/arch/arm/rte.vars.mk | 5 + mk/arch/arm64/rte.vars.mk | 5 + mk/arch/i686/rte.vars.mk | 5 + mk/arch/x86_64/rte.vars.mk | 5 + mk/arch/x86_x32/rte.vars.mk | 5 + 36 files changed, 820 insertions(+), 26 deletions(-) create mode 100644 app/test/resource.c create mode 100644 app/test/resource.h create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/class create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/config create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/consistent_dma_mask_bits create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/device create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/dma_mask_bits create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/enable create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/irq create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/modalias create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/msi_bus create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/numa_node create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/resource create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/sriov_numvfs create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/sriov_totalvfs create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_device create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_vendor create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/uevent create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/vendor create mode 100644 app/test/test_resource.c -- 2.8.0