Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [kvm-x86:selftests2] [KVM]  a262fc49e0: kselftests.kvm.make.fail
@ 2026-08-07  9:14 kernel test robot
  2026-08-07 18:35 ` Sean Christopherson
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2026-08-07  9:14 UTC (permalink / raw)
  To: David Matlack
  Cc: oe-lkp, lkp, Sean Christopherson, Josh Hilke, kvm, oliver.sang



Hello,

kernel test robot noticed "kselftests.kvm.make.fail" on:

commit: a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 ("KVM: selftests: Build and link selftests/vfio/lib into KVM selftests")
https://github.com/kvm-x86/linux selftests2

[test failed on linux-next/master 78bc8af4affb9a732504eb22eeac7d1e50883853]

in testcase: kselftests
version: kselftests-x86_64-848acc8ffe1b-1_20260804
with following parameters:

	group: kvm


config: x86_64-rhel-9.4-kselftests
compiler: gcc-14
test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)


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 <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202608071656.86e9fd06-lkp@intel.com


/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c:12:10: fatal error: hw.h: No such file or directory
   12 | #include "hw.h"
      |          ^~~~~~
compilation terminated.
make[1]: *** [../vfio/lib/libvfio.mk:32: /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/ioat/ioat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10: fatal error: registers.h: No such file or directory
   14 | #include "registers.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [../vfio/lib/libvfio.mk:32: /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o] Error 1
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm'
make: *** [Makefile:218: all] Error 2



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20260807/202608071656.86e9fd06-lkp@intel.com



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


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

* Re: [kvm-x86:selftests2] [KVM]  a262fc49e0: kselftests.kvm.make.fail
  2026-08-07  9:14 [kvm-x86:selftests2] [KVM] a262fc49e0: kselftests.kvm.make.fail kernel test robot
@ 2026-08-07 18:35 ` Sean Christopherson
  2026-08-07 22:21   ` David Matlack
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Christopherson @ 2026-08-07 18:35 UTC (permalink / raw)
  To: kernel test robot; +Cc: David Matlack, oe-lkp, lkp, Josh Hilke, kvm

On Fri, Aug 07, 2026, kernel test robot wrote:
> 
> 
> Hello,
> 
> kernel test robot noticed "kselftests.kvm.make.fail" on:
> 
> commit: a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 ("KVM: selftests: Build and link selftests/vfio/lib into KVM selftests")
> https://github.com/kvm-x86/linux selftests2
> 
> [test failed on linux-next/master 78bc8af4affb9a732504eb22eeac7d1e50883853]
> 
> in testcase: kselftests
> version: kselftests-x86_64-848acc8ffe1b-1_20260804
> with following parameters:
> 
> 	group: kvm
> 
> 
> config: x86_64-rhel-9.4-kselftests
> compiler: gcc-14
> test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory
> 
> (please refer to attached dmesg/kmsg for entire log/backtrace)
> 
> 
> 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 <oliver.sang@intel.com>
> | Closes: https://lore.kernel.org/oe-lkp/202608071656.86e9fd06-lkp@intel.com
> 
> 
> /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c:12:10: fatal error: hw.h: No such file or directory
>    12 | #include "hw.h"
>       |          ^~~~~~
> compilation terminated.
> make[1]: *** [../vfio/lib/libvfio.mk:32:
> /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/ioat/ioat.o]
> Error 1 make[1]: *** Waiting for unfinished jobs....
> /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10:
> fatal error: registers.h: No such file or directory
>    14 | #include "registers.h"
>       |          ^~~~~~~~~~~~~
> compilation terminated.
> make[1]: *** [../vfio/lib/libvfio.mk:32:
> /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o]
> Error 1 make[1]: Leaving directory
> '/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm'
> make: *** [Makefile:218: all] Error 2

Any chance the file is literally just not there?  Makefile.kvm's -I$(<D) expands
to:

 -I/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa

which matches the directory of the input file:

 -c/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c

so AFAICT the makefile is working as intended?

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

* Re: [kvm-x86:selftests2] [KVM]  a262fc49e0: kselftests.kvm.make.fail
  2026-08-07 18:35 ` Sean Christopherson
@ 2026-08-07 22:21   ` David Matlack
  2026-08-11 21:41     ` David Matlack
  2026-08-12  1:22     ` Philip Li
  0 siblings, 2 replies; 7+ messages in thread
From: David Matlack @ 2026-08-07 22:21 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: kernel test robot, oe-lkp, lkp, Josh Hilke, kvm

On 2026-08-07 11:35 AM, Sean Christopherson wrote:
> On Fri, Aug 07, 2026, kernel test robot wrote:
> > 
> > 
> > Hello,
> > 
> > kernel test robot noticed "kselftests.kvm.make.fail" on:
> > 
> > commit: a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 ("KVM: selftests: Build and link selftests/vfio/lib into KVM selftests")
> > https://github.com/kvm-x86/linux selftests2
> > 
> > [test failed on linux-next/master 78bc8af4affb9a732504eb22eeac7d1e50883853]
> > 
> > in testcase: kselftests
> > version: kselftests-x86_64-848acc8ffe1b-1_20260804
> > with following parameters:
> > 
> > 	group: kvm
> > 
> > 
> > config: x86_64-rhel-9.4-kselftests
> > compiler: gcc-14
> > test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory
> > 
> > (please refer to attached dmesg/kmsg for entire log/backtrace)
> > 
> > 
> > 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 <oliver.sang@intel.com>
> > | Closes: https://lore.kernel.org/oe-lkp/202608071656.86e9fd06-lkp@intel.com
> > 
> > 
> > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c:12:10: fatal error: hw.h: No such file or directory
> >    12 | #include "hw.h"
> >       |          ^~~~~~
> > compilation terminated.
> > make[1]: *** [../vfio/lib/libvfio.mk:32:
> > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/ioat/ioat.o]
> > Error 1 make[1]: *** Waiting for unfinished jobs....
> > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10:
> > fatal error: registers.h: No such file or directory
> >    14 | #include "registers.h"
> >       |          ^~~~~~~~~~~~~
> > compilation terminated.
> > make[1]: *** [../vfio/lib/libvfio.mk:32:
> > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o]
> > Error 1 make[1]: Leaving directory
> > '/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm'
> > make: *** [Makefile:218: all] Error 2
> 
> Any chance the file is literally just not there?  Makefile.kvm's -I$(<D) expands
> to:
> 
>  -I/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa
> 
> which matches the directory of the input file:
> 
>  -c/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c
> 
> so AFAICT the makefile is working as intended?

I think this is a problem in how the kernel test robot builds selftests.

hw.h and registers.h are symlinks to headers in the kernel source tree.
The selftests build works fine for me when I check out the entire kernel
tree at commit a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 and build the
KVM selftests.

But if I delete one of the symlink destinations, I see the same error.

$ ls -l tools/testing/selftests/vfio/lib/drivers/dsa/registers.h
[...] tools/testing/selftests/vfio/lib/drivers/dsa/registers.h -> ../../../../../../../drivers/dma/idxd/registers.h

$ rm drivers/dma/idxd/registers.h

$ make -C tools/testing/selftests/kvm -s
/usr/local/google/home/dmatlack/kernel/trees/kvm/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10: fatal error: registers.h: No such file or directory
   14 | #include "registers.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [../vfio/lib/libvfio.mk:32: /usr/local/google/home/dmatlack/kernel/trees/kvm/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o] Error 1

Maybe the kernel test robot doesn't download the entire kernel tree when
building selftests?

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

* Re: [kvm-x86:selftests2] [KVM]  a262fc49e0: kselftests.kvm.make.fail
  2026-08-07 22:21   ` David Matlack
@ 2026-08-11 21:41     ` David Matlack
  2026-08-11 21:55       ` David Matlack
  2026-08-12  1:22     ` Philip Li
  1 sibling, 1 reply; 7+ messages in thread
From: David Matlack @ 2026-08-11 21:41 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: kernel test robot, oe-lkp, lkp, Josh Hilke, kvm

On 2026-08-07 10:21 PM, David Matlack wrote:
> On 2026-08-07 11:35 AM, Sean Christopherson wrote:
> > On Fri, Aug 07, 2026, kernel test robot wrote:
> > > 
> > > 
> > > Hello,
> > > 
> > > kernel test robot noticed "kselftests.kvm.make.fail" on:
> > > 
> > > commit: a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 ("KVM: selftests: Build and link selftests/vfio/lib into KVM selftests")
> > > https://github.com/kvm-x86/linux selftests2
> > > 
> > > [test failed on linux-next/master 78bc8af4affb9a732504eb22eeac7d1e50883853]
> > > 
> > > in testcase: kselftests
> > > version: kselftests-x86_64-848acc8ffe1b-1_20260804
> > > with following parameters:
> > > 
> > > 	group: kvm
> > > 
> > > 
> > > config: x86_64-rhel-9.4-kselftests
> > > compiler: gcc-14
> > > test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory
> > > 
> > > (please refer to attached dmesg/kmsg for entire log/backtrace)
> > > 
> > > 
> > > 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 <oliver.sang@intel.com>
> > > | Closes: https://lore.kernel.org/oe-lkp/202608071656.86e9fd06-lkp@intel.com
> > > 
> > > 
> > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c:12:10: fatal error: hw.h: No such file or directory
> > >    12 | #include "hw.h"
> > >       |          ^~~~~~
> > > compilation terminated.
> > > make[1]: *** [../vfio/lib/libvfio.mk:32:
> > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/ioat/ioat.o]
> > > Error 1 make[1]: *** Waiting for unfinished jobs....
> > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10:
> > > fatal error: registers.h: No such file or directory
> > >    14 | #include "registers.h"
> > >       |          ^~~~~~~~~~~~~
> > > compilation terminated.
> > > make[1]: *** [../vfio/lib/libvfio.mk:32:
> > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o]
> > > Error 1 make[1]: Leaving directory
> > > '/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm'
> > > make: *** [Makefile:218: all] Error 2
> > 
> > Any chance the file is literally just not there?  Makefile.kvm's -I$(<D) expands
> > to:
> > 
> >  -I/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa
> > 
> > which matches the directory of the input file:
> > 
> >  -c/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c
> > 
> > so AFAICT the makefile is working as intended?
> 
> I think this is a problem in how the kernel test robot builds selftests.
> 
> hw.h and registers.h are symlinks to headers in the kernel source tree.
> The selftests build works fine for me when I check out the entire kernel
> tree at commit a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 and build the
> KVM selftests.
> 
> But if I delete one of the symlink destinations, I see the same error.
> 
> $ ls -l tools/testing/selftests/vfio/lib/drivers/dsa/registers.h
> [...] tools/testing/selftests/vfio/lib/drivers/dsa/registers.h -> ../../../../../../../drivers/dma/idxd/registers.h
> 
> $ rm drivers/dma/idxd/registers.h
> 
> $ make -C tools/testing/selftests/kvm -s
> /usr/local/google/home/dmatlack/kernel/trees/kvm/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10: fatal error: registers.h: No such file or directory
>    14 | #include "registers.h"
>       |          ^~~~~~~~~~~~~
> compilation terminated.
> make: *** [../vfio/lib/libvfio.mk:32: /usr/local/google/home/dmatlack/kernel/trees/kvm/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o] Error 1
> 
> Maybe the kernel test robot doesn't download the entire kernel tree when
> building selftests?

Yeah this seems to be the cause of the build failure. The lkp project
only grabs a subset of the kernel directories when packaging up the
kernel to build selftests, so it will not have access to the symlink
targets used by VFIO selftests:

  https://github.com/intel/lkp-tests/blob/bbbc29c495d9617f28dbc8b799cf0dac9a1ca54e/lib/tests/pkgbuild.sh#L484

I'll get the ball rolling on fixing this in lkp.

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

* Re: [kvm-x86:selftests2] [KVM]  a262fc49e0: kselftests.kvm.make.fail
  2026-08-11 21:41     ` David Matlack
@ 2026-08-11 21:55       ` David Matlack
  2026-08-12  1:33         ` Philip Li
  0 siblings, 1 reply; 7+ messages in thread
From: David Matlack @ 2026-08-11 21:55 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: kernel test robot, oe-lkp, lkp, Josh Hilke, kvm

On 2026-08-11 09:41 PM, David Matlack wrote:
> On 2026-08-07 10:21 PM, David Matlack wrote:
> > On 2026-08-07 11:35 AM, Sean Christopherson wrote:
> > > On Fri, Aug 07, 2026, kernel test robot wrote:
> > > > 
> > > > 
> > > > Hello,
> > > > 
> > > > kernel test robot noticed "kselftests.kvm.make.fail" on:
> > > > 
> > > > commit: a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 ("KVM: selftests: Build and link selftests/vfio/lib into KVM selftests")
> > > > https://github.com/kvm-x86/linux selftests2
> > > > 
> > > > [test failed on linux-next/master 78bc8af4affb9a732504eb22eeac7d1e50883853]
> > > > 
> > > > in testcase: kselftests
> > > > version: kselftests-x86_64-848acc8ffe1b-1_20260804
> > > > with following parameters:
> > > > 
> > > > 	group: kvm
> > > > 
> > > > 
> > > > config: x86_64-rhel-9.4-kselftests
> > > > compiler: gcc-14
> > > > test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory
> > > > 
> > > > (please refer to attached dmesg/kmsg for entire log/backtrace)
> > > > 
> > > > 
> > > > 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 <oliver.sang@intel.com>
> > > > | Closes: https://lore.kernel.org/oe-lkp/202608071656.86e9fd06-lkp@intel.com
> > > > 
> > > > 
> > > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c:12:10: fatal error: hw.h: No such file or directory
> > > >    12 | #include "hw.h"
> > > >       |          ^~~~~~
> > > > compilation terminated.
> > > > make[1]: *** [../vfio/lib/libvfio.mk:32:
> > > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/ioat/ioat.o]
> > > > Error 1 make[1]: *** Waiting for unfinished jobs....
> > > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10:
> > > > fatal error: registers.h: No such file or directory
> > > >    14 | #include "registers.h"
> > > >       |          ^~~~~~~~~~~~~
> > > > compilation terminated.
> > > > make[1]: *** [../vfio/lib/libvfio.mk:32:
> > > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o]
> > > > Error 1 make[1]: Leaving directory
> > > > '/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm'
> > > > make: *** [Makefile:218: all] Error 2
> > > 
> > > Any chance the file is literally just not there?  Makefile.kvm's -I$(<D) expands
> > > to:
> > > 
> > >  -I/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa
> > > 
> > > which matches the directory of the input file:
> > > 
> > >  -c/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c
> > > 
> > > so AFAICT the makefile is working as intended?
> > 
> > I think this is a problem in how the kernel test robot builds selftests.
> > 
> > hw.h and registers.h are symlinks to headers in the kernel source tree.
> > The selftests build works fine for me when I check out the entire kernel
> > tree at commit a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 and build the
> > KVM selftests.
> > 
> > But if I delete one of the symlink destinations, I see the same error.
> > 
> > $ ls -l tools/testing/selftests/vfio/lib/drivers/dsa/registers.h
> > [...] tools/testing/selftests/vfio/lib/drivers/dsa/registers.h -> ../../../../../../../drivers/dma/idxd/registers.h
> > 
> > $ rm drivers/dma/idxd/registers.h
> > 
> > $ make -C tools/testing/selftests/kvm -s
> > /usr/local/google/home/dmatlack/kernel/trees/kvm/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10: fatal error: registers.h: No such file or directory
> >    14 | #include "registers.h"
> >       |          ^~~~~~~~~~~~~
> > compilation terminated.
> > make: *** [../vfio/lib/libvfio.mk:32: /usr/local/google/home/dmatlack/kernel/trees/kvm/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o] Error 1
> > 
> > Maybe the kernel test robot doesn't download the entire kernel tree when
> > building selftests?
> 
> Yeah this seems to be the cause of the build failure. The lkp project
> only grabs a subset of the kernel directories when packaging up the
> kernel to build selftests, so it will not have access to the symlink
> targets used by VFIO selftests:
> 
>   https://github.com/intel/lkp-tests/blob/bbbc29c495d9617f28dbc8b799cf0dac9a1ca54e/lib/tests/pkgbuild.sh#L484
> 
> I'll get the ball rolling on fixing this in lkp.

Here's my proposed fix, in case anyone wants to follow along:

  https://github.com/intel/lkp-tests/pull/567

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

* Re: [kvm-x86:selftests2] [KVM]  a262fc49e0: kselftests.kvm.make.fail
  2026-08-07 22:21   ` David Matlack
  2026-08-11 21:41     ` David Matlack
@ 2026-08-12  1:22     ` Philip Li
  1 sibling, 0 replies; 7+ messages in thread
From: Philip Li @ 2026-08-12  1:22 UTC (permalink / raw)
  To: David Matlack
  Cc: Sean Christopherson, kernel test robot, oe-lkp, lkp, Josh Hilke,
	kvm

On Fri, Aug 07, 2026 at 10:21:55PM +0000, David Matlack wrote:
> On 2026-08-07 11:35 AM, Sean Christopherson wrote:
> > On Fri, Aug 07, 2026, kernel test robot wrote:
> > > 
> > > 
> > > Hello,
> > > 
> > > kernel test robot noticed "kselftests.kvm.make.fail" on:
> > > 
> > > commit: a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 ("KVM: selftests: Build and link selftests/vfio/lib into KVM selftests")
> > > https://github.com/kvm-x86/linux selftests2
> > > 
> > > [test failed on linux-next/master 78bc8af4affb9a732504eb22eeac7d1e50883853]
> > > 
> > > in testcase: kselftests
> > > version: kselftests-x86_64-848acc8ffe1b-1_20260804
> > > with following parameters:
> > > 
> > > 	group: kvm
> > > 
> > > 
> > > config: x86_64-rhel-9.4-kselftests
> > > compiler: gcc-14
> > > test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory
> > > 
> > > (please refer to attached dmesg/kmsg for entire log/backtrace)
> > > 
> > > 
> > > 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 <oliver.sang@intel.com>
> > > | Closes: https://lore.kernel.org/oe-lkp/202608071656.86e9fd06-lkp@intel.com
> > > 
> > > 
> > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c:12:10: fatal error: hw.h: No such file or directory
> > >    12 | #include "hw.h"
> > >       |          ^~~~~~
> > > compilation terminated.
> > > make[1]: *** [../vfio/lib/libvfio.mk:32:
> > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/ioat/ioat.o]
> > > Error 1 make[1]: *** Waiting for unfinished jobs....
> > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10:
> > > fatal error: registers.h: No such file or directory
> > >    14 | #include "registers.h"
> > >       |          ^~~~~~~~~~~~~
> > > compilation terminated.
> > > make[1]: *** [../vfio/lib/libvfio.mk:32:
> > > /usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o]
> > > Error 1 make[1]: Leaving directory
> > > '/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/kvm'
> > > make: *** [Makefile:218: all] Error 2
> > 
> > Any chance the file is literally just not there?  Makefile.kvm's -I$(<D) expands
> > to:
> > 
> >  -I/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa
> > 
> > which matches the directory of the input file:
> > 
> >  -c/usr/src/perf_selftests-x86_64-rhel-9.4-kselftests-a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c
> > 
> > so AFAICT the makefile is working as intended?
> 
> I think this is a problem in how the kernel test robot builds selftests.

Sorry for the wrong report. The analysis below is very helpful that the bot
ignores the symlink when packing the related sources.

We had resolved the issue for internal packing logic and we will be more careful
to avoid false positive report in future.

> 
> hw.h and registers.h are symlinks to headers in the kernel source tree.
> The selftests build works fine for me when I check out the entire kernel
> tree at commit a262fc49e0aafdeeb1b4fd8cb0d79a0fde447757 and build the
> KVM selftests.
> 
> But if I delete one of the symlink destinations, I see the same error.
> 
> $ ls -l tools/testing/selftests/vfio/lib/drivers/dsa/registers.h
> [...] tools/testing/selftests/vfio/lib/drivers/dsa/registers.h -> ../../../../../../../drivers/dma/idxd/registers.h
> 
> $ rm drivers/dma/idxd/registers.h
> 
> $ make -C tools/testing/selftests/kvm -s
> /usr/local/google/home/dmatlack/kernel/trees/kvm/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c:14:10: fatal error: registers.h: No such file or directory
>    14 | #include "registers.h"
>       |          ^~~~~~~~~~~~~
> compilation terminated.
> make: *** [../vfio/lib/libvfio.mk:32: /usr/local/google/home/dmatlack/kernel/trees/kvm/tools/testing/selftests/kvm/libvfio/drivers/dsa/dsa.o] Error 1
> 
> Maybe the kernel test robot doesn't download the entire kernel tree when
> building selftests?
> 

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

* Re: [kvm-x86:selftests2] [KVM]  a262fc49e0: kselftests.kvm.make.fail
  2026-08-11 21:55       ` David Matlack
@ 2026-08-12  1:33         ` Philip Li
  0 siblings, 0 replies; 7+ messages in thread
From: Philip Li @ 2026-08-12  1:33 UTC (permalink / raw)
  To: David Matlack
  Cc: Sean Christopherson, kernel test robot, oe-lkp, lkp, Josh Hilke,
	kvm

On Tue, Aug 11, 2026 at 09:55:36PM +0000, David Matlack wrote:
> 
> Here's my proposed fix, in case anyone wants to follow along:
> 
>   https://github.com/intel/lkp-tests/pull/567

Thanks again, I will follow up this PR.

> 

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

end of thread, other threads:[~2026-08-12  1:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07  9:14 [kvm-x86:selftests2] [KVM] a262fc49e0: kselftests.kvm.make.fail kernel test robot
2026-08-07 18:35 ` Sean Christopherson
2026-08-07 22:21   ` David Matlack
2026-08-11 21:41     ` David Matlack
2026-08-11 21:55       ` David Matlack
2026-08-12  1:33         ` Philip Li
2026-08-12  1:22     ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox