[dpdk-dev] [PATCH v1 00/10] Include resources in tests

Jan Viktorin viktorin at rehivetech.com
Fri May 6 12:48:30 CEST 2016


Hello,

the second round of the approach to include resources in the test application.
I've tested on top of 84c9b5a so it should work now as expected without any
dependencies.

I've included 5 patches more related to the PCI and PCI tests. They should
probably go in their own patch series but I wanted to show how the resource
"API" can be used for current tests. The PCI tests should now work everywhere.
I recommend to execute as ./test --no-pci (optionally --no-huge) to avoid
scanning of the real devices on startup.

The resource "API" is still not very nice...

Regards
Jan

---
v1
* fix non-existing RTE_INIT, using raw __attribute__ approach instead
* included PCI test changes to demonstrate resource API

Jan Viktorin (10):
  app/test: introduce resources for tests
  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                                  |  42 ++++
 app/test/resource.c                                | 276 +++++++++++++++++++++
 app/test/resource.h                                |  99 ++++++++
 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 +
 31 files changed, 750 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



More information about the dev mailing list