All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] vfio: selftests: Fix out-of-tree build with make O=
@ 2026-08-17 10:30 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-08-17 10:30 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: Manual check reason: "only suspicious fbc files changed"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <0-v1-79f29139180b+8e-vfio_st_make_o_jgg@nvidia.com>
References: <0-v1-79f29139180b+8e-vfio_st_make_o_jgg@nvidia.com>
TO: Jason Gunthorpe <jgg@nvidia.com>
TO: Alex Williamson <alex@shazbot.org>
TO: kvm@vger.kernel.org
TO: linux-kselftest@vger.kernel.org
TO: Shuah Khan <skhan@linuxfoundation.org>
CC: David Matlack <dmatlack@google.com>
CC: patches@lists.linux.dev

Hi Jason,

kernel test robot noticed the following build errors:

[auto build test ERROR on 681b35420592a2e072d9759254185e72d2e914c8]

url:    https://github.com/intel-lab-lkp/linux/commits/Jason-Gunthorpe/vfio-selftests-Fix-out-of-tree-build-with-make-O/20260813-191912
base:   681b35420592a2e072d9759254185e72d2e914c8
patch link:    https://lore.kernel.org/r/0-v1-79f29139180b%2B8e-vfio_st_make_o_jgg%40nvidia.com
patch subject: [PATCH] vfio: selftests: Fix out-of-tree build with make O=
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260817/202608171225.NJO5REjA-lkp@intel.com/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260817/202608171225.NJO5REjA-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202608171225.NJO5REjA-lkp@intel.com/

All errors (new ones prefixed by >>):

   make[1]: *** [../../lib.mk:225: tools/testing/selftests/drivers/net/psp_responder] Error 1
   make[1]: Target 'all' not remade because of errors.
   make[1]: *** [Makefile:124: tools/testing/selftests/hid/host-tools/sbin/bpftool] Error 2
   make[1]: Target 'all' not remade because of errors.
   make[1]: *** No targets.  Stop.
   make[1]: *** [../lib.mk:225: tools/testing/selftests/net/busy_poller] Error 1
   make[1]: *** [../lib.mk:224: tools/testing/selftests/net/tun] Error 1
   make[1]: Target 'all' not remade because of errors.
   make[1]: *** No targets specified and no makefile found.  Stop.
   Makefile:60: warning: overriding recipe for target 'emit_tests'
   ../lib.mk:182: warning: ignoring old recipe for target 'emit_tests'
   make[1]: *** No targets.  Stop.
   make[1]: *** No targets.  Stop.
   make[1]: *** No targets.  Stop.
>> make[1]: *** No rule to make target 'vfio_dma_mapping_test(OUTPUT)/%.o', needed by 'tools/testing/selftests/vfio/vfio_dma_mapping_test'.
>> make[1]: *** No rule to make target 'vfio_dma_mapping_mmio_test(OUTPUT)/%.o', needed by 'tools/testing/selftests/vfio/vfio_dma_mapping_mmio_test'.
>> make[1]: *** No rule to make target 'vfio_iommufd_setup_test(OUTPUT)/%.o', needed by 'tools/testing/selftests/vfio/vfio_iommufd_setup_test'.
>> make[1]: *** No rule to make target 'vfio_pci_device_test(OUTPUT)/%.o', needed by 'tools/testing/selftests/vfio/vfio_pci_device_test'.
>> make[1]: *** No rule to make target 'vfio_pci_device_init_perf_test(OUTPUT)/%.o', needed by 'tools/testing/selftests/vfio/vfio_pci_device_init_perf_test'.
>> make[1]: *** No rule to make target 'vfio_pci_driver_test(OUTPUT)/%.o', needed by 'tools/testing/selftests/vfio/vfio_pci_driver_test'.
   make[1]: Target 'all' not remade because of errors.

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] vfio: selftests: Fix out-of-tree build with make O=
@ 2026-04-27 23:07 Jason Gunthorpe
  2026-04-27 23:15 ` Jason Gunthorpe
  2026-04-28 18:27 ` David Matlack
  0 siblings, 2 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2026-04-27 23:07 UTC (permalink / raw)
  To: Alex Williamson, kvm, linux-kselftest, Shuah Khan
  Cc: Alex Williamson, David Matlack, patches, Shuah Khan

The test programs are compiled via a static pattern rule that requires
intermediate .o files:

  $(TEST_GEN_PROGS): %: %.o $(LIBVFIO_O)

After lib.mk prefixes TEST_GEN_PROGS with $(OUTPUT), this creates
dependencies on .o files in the output directory (e.g.
$(OUTPUT)/vfio_dma_mapping_test.o). However, there is no rule to compile
these .o files from the source directory .c files when OUTPUT differs
from the source directory.

Add an explicit chain of pattern rules:
  $(OUTPUT)/% -> $(OUTPUT)/%.o -> %.c

Following the same pattern already used in libvfio.mk for the library
objects.

Fixes: 19faf6fd969c ("vfio: selftests: Add a helper library for VFIO selftests")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
---
 tools/testing/selftests/vfio/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
index 40165d087a0bc4..81c3be8298fdc2 100644
--- a/tools/testing/selftests/vfio/Makefile
+++ b/tools/testing/selftests/vfio/Makefile
@@ -27,10 +27,13 @@ CFLAGS += $(EXTRA_CFLAGS)
 
 LDFLAGS += -pthread
 
-$(TEST_GEN_PROGS): %: %.o $(LIBVFIO_O)
+$(TEST_GEN_PROGS): $(OUTPUT)/%: %(OUTPUT)/%.o $(LIBVFIO_O)
 	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< $(LIBVFIO_O) $(LDLIBS) -o $@
 
 TEST_GEN_PROGS_O = $(patsubst %, %.o, $(TEST_GEN_PROGS))
+$(TEST_GEN_PROGS_O): $(OUTPUT)/%.o: %.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+
 TEST_DEP_FILES = $(patsubst %.o, %.d, $(TEST_GEN_PROGS_O) $(LIBVFIO_O))
 -include $(TEST_DEP_FILES)
 

base-commit: 681b35420592a2e072d9759254185e72d2e914c8
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-17 10:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 10:30 [PATCH] vfio: selftests: Fix out-of-tree build with make O= kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-04-27 23:07 Jason Gunthorpe
2026-04-27 23:15 ` Jason Gunthorpe
2026-04-28 18:27 ` David Matlack
2026-04-28 19:04   ` Jason Gunthorpe
2026-04-28 20:16     ` David Matlack

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.