selftests: Move PCI Endpoint tests from tools/pci to Kselftests

This just moves the existing tests under tools/pci to
tools/testing/selftests/pci_endpoint and adjusts the paths in Makefile
accordingly. Migration to Kselftest framework will be done in subsequent
commits.

Link: https://lore.kernel.org/r/20250116171650.33585-4-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
This commit is contained in:
Manivannan Sadhasivam 2025-01-16 22:46:49 +05:30 committed by Bjorn Helgaas
parent f26d37ee9b
commit e19bde2269
7 changed files with 14 additions and 10 deletions

View File

@ -123,16 +123,17 @@ above::
Using Endpoint Test function Device
-----------------------------------
pcitest.sh added in tools/pci/ can be used to run all the default PCI endpoint
tests. To compile this tool the following commands should be used::
pcitest.sh added in tools/testing/selftests/pci_endpoint can be used to run all
the default PCI endpoint tests. To compile this tool the following commands
should be used::
# cd <kernel-dir>
# make -C tools/pci
# make -C tools/testing/selftests/pci_endpoint
or if you desire to compile and install in your system::
# cd <kernel-dir>
# make -C tools/pci install
# make -C tools/testing/selftests/pci_endpoint install
The tool and script will be located in <rootfs>/usr/bin/

View File

@ -18003,7 +18003,7 @@ F: Documentation/PCI/endpoint/*
F: Documentation/misc-devices/pci-endpoint-test.rst
F: drivers/misc/pci_endpoint_test.c
F: drivers/pci/endpoint/
F: tools/pci/
F: tools/testing/selftests/pci_endpoint/
PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC
M: Mahesh J Salgaonkar <mahesh@linux.ibm.com>

View File

@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
*.o
pcitest

View File

@ -1,11 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
include ../scripts/Makefile.include
include ../../../scripts/Makefile.include
bindir ?= /usr/bin
ifeq ($(srctree),)
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
srctree := $(patsubst %/tools/testing/selftests/,%,$(dir $(CURDIR)))
endif
# Do not use make's built-in rules
@ -27,10 +26,11 @@ include $(srctree)/tools/build/Makefile.include
#
# We need the following to be outside of kernel tree
#
$(OUTPUT)include/linux/: ../../include/uapi/linux/
$(OUTPUT)include/linux/: ../../../../include/uapi/linux/
mkdir -p $(OUTPUT)include/linux/ 2>&1 || true
ln -sf $(CURDIR)/../../include/uapi/linux/pcitest.h $@
ln -sf $(CURDIR)/../../../../include/uapi/linux/pcitest.h $@
$(info ${CURDIR})
prepare: $(OUTPUT)include/linux/
PCITEST_IN := $(OUTPUT)pcitest-in.o