Re: [PATCH bpf-next 2/2] selftests/bpf: set vpath in Makefile to search for skels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2024-09-16 at 19:59 +0000, Ihor Solodrai wrote:

[...]

> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index df75f1beb731..365740f24d2e 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -622,10 +622,11 @@ $(TRUNNER_BPF_SKELS_LINKED): $(TRUNNER_OUTPUT)/%: $$$$(%-deps) $(BPFTOOL) | $(TR
>  
>  # When the compiler generates a %.d file, only skel basenames (not
>  # full paths) are specified as prerequisites for corresponding %.o
> -# file. This target makes %.skel.h basename dependent on full paths,
> -# linking generated %.d dependency with actual %.skel.h files.
> -$(notdir %.skel.h): $(TRUNNER_OUTPUT)/%.skel.h
> -	@true
> +# file. vpath directives below instruct make to search for skel files
> +# in TRUNNER_OUTPUT, if they are not present in the working directory.
> +vpath %.skel.h $(TRUNNER_OUTPUT)
> +vpath %.lskel.h $(TRUNNER_OUTPUT)
> +vpath %.subskel.h $(TRUNNER_OUTPUT)
>  
>  endif

When I try this patch, the following happens after first full tests build:

$ touch progs/verifier_and.c; make -j test_progs

  CLNG-BPF [test_progs] verifier_and.bpf.o
  CLNG-BPF [test_progs-no_alu32] verifier_and.bpf.o
  CLNG-BPF [test_progs-cpuv4] verifier_and.bpf.o
  GEN-SKEL [test_progs] verifier_and.skel.h
  GEN-SKEL [test_progs-no_alu32] verifier_and.skel.h
  GEN-SKEL [test_progs-cpuv4] verifier_and.skel.h
  TEST-OBJ [test_progs] verifier.test.o
  BINARY   test_progs

Note that multiple binaries are built.






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux