summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Logan <tedlogan@fb.com>2026-02-02 17:23:53 -0800
committerAlex Williamson <alex@shazbot.org>2026-02-06 15:08:05 -0700
commita55d4bbbe64494bb92b32402018efb2ffc44d796 (patch)
tree78d8ed99f58116eddb1b7ee85e3258a7edc31f6f
parentc3cbc276c2a33b04fc78a86cdb2ddce094cb3614 (diff)
vfio: selftests: only build tests on arm64 and x86_64
Only build vfio self-tests on arm64 and x86_64; these are the only architectures where the vfio self-tests are run. Addresses compiler warnings for format and conversions on i386. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202601211830.aBEjmEFD-lkp@intel.com/ Signed-off-by: Ted Logan <tedlogan@fb.com> Reviewed-by: David Matlack <dmatlack@google.com> Link: https://lore.kernel.org/r/20260202-vfio-selftest-only-64bit-v2-1-9c3ebb37f0f4@fb.com Signed-off-by: Alex Williamson <alex@shazbot.org>
-rw-r--r--tools/testing/selftests/vfio/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
index ead27892ab65..8e90e409e91d 100644
--- a/tools/testing/selftests/vfio/Makefile
+++ b/tools/testing/selftests/vfio/Makefile
@@ -1,3 +1,10 @@
+ARCH ?= $(shell uname -m)
+
+ifeq (,$(filter $(ARCH),arm64 x86_64))
+# Do nothing on unsupported architectures
+include ../lib.mk
+else
+
CFLAGS = $(KHDR_INCLUDES)
TEST_GEN_PROGS += vfio_dma_mapping_test
TEST_GEN_PROGS += vfio_dma_mapping_mmio_test
@@ -28,3 +35,5 @@ TEST_DEP_FILES = $(patsubst %.o, %.d, $(TEST_GEN_PROGS_O) $(LIBVFIO_O))
-include $(TEST_DEP_FILES)
EXTRA_CLEAN += $(TEST_GEN_PROGS_O) $(TEST_DEP_FILES)
+
+endif