]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: Move PCI Endpoint tests from tools/pci to Kselftests
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 16 Jan 2025 17:16:49 +0000 (22:46 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 21 Jan 2025 20:17:55 +0000 (14:17 -0600)
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>
Documentation/PCI/endpoint/pci-test-howto.rst
MAINTAINERS
tools/testing/selftests/pci_endpoint/.gitignore [new file with mode: 0644]
tools/testing/selftests/pci_endpoint/Build [moved from tools/pci/Build with 100% similarity]
tools/testing/selftests/pci_endpoint/Makefile [moved from tools/pci/Makefile with 83% similarity]
tools/testing/selftests/pci_endpoint/pcitest.c [moved from tools/pci/pcitest.c with 100% similarity]
tools/testing/selftests/pci_endpoint/pcitest.sh [moved from tools/pci/pcitest.sh with 100% similarity]

index 909f770a07d654683479e1b6357e6e9558d49516..c4ae7af50ede2870f86c25feeea792fbf1007952 100644 (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/
 
index 1e930c7a58b13d8bbe6bf133ba7b36aa24c2b5e0..0e611b845d50cc3b5ed12f7c50588bd2dd388de6 100644 (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>
diff --git a/tools/testing/selftests/pci_endpoint/.gitignore b/tools/testing/selftests/pci_endpoint/.gitignore
new file mode 100644 (file)
index 0000000..29ab47c
--- /dev/null
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+*.o
+pcitest
similarity index 83%
rename from tools/pci/Makefile
rename to tools/testing/selftests/pci_endpoint/Makefile
index 62d41f1a1e2c118a53725fa057dc963b51953796..3c6fe18e32ccd5c2d92443180493e3d0de49f012 100644 (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