Re: [PATCH bpf-next] selftests/bpf: Build testing_helpers.o out of tree

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

 



On Mon, Nov 29, 2021 at 03:23:02PM -0800, Andrii Nakryiko wrote:
> On Mon, Nov 29, 2021 at 3:17 AM Jean-Philippe Brucker
> <jean-philippe@xxxxxxxxxx> wrote:
> >
> > Add $(OUTPUT) prefix to testing_helpers.o, so it can be built out of
> > tree when necessary. At the moment, in addition to being built in-tree
> > even when out-of-tree is required, testing_helpers.o is not built with
> > the right recipe when cross-building.
> >
> > Fixes: f87c1930ac29 ("selftests/bpf: Merge test_stub.c into testing_helpers.c")
> > Signed-off-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
> > ---
> >  tools/testing/selftests/bpf/Makefile | 32 ++++++++++++++--------------
> >  1 file changed, 16 insertions(+), 16 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> > index 35684d61aaeb..082f6aeec1d9 100644
> > --- a/tools/testing/selftests/bpf/Makefile
> > +++ b/tools/testing/selftests/bpf/Makefile
> > @@ -192,22 +192,22 @@ TEST_GEN_PROGS_EXTENDED += $(DEFAULT_BPFTOOL)
> >
> >  $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(BPFOBJ)
> >
> > -$(OUTPUT)/test_dev_cgroup: cgroup_helpers.c testing_helpers.o
> 
> one of cgroup_helper.c (C source code) or testing_helper.o (object
> file) is wrong, let's ensure that the dependencies are correct while
> at it?

Sure, I'll change this to object files

Thanks,
Jean

> 
> 
> > -$(OUTPUT)/test_skb_cgroup_id_user: cgroup_helpers.c testing_helpers.o
> > -$(OUTPUT)/test_sock: cgroup_helpers.c testing_helpers.o
> > -$(OUTPUT)/test_sock_addr: cgroup_helpers.c testing_helpers.o
> > -$(OUTPUT)/test_sockmap: cgroup_helpers.c testing_helpers.o
> > -$(OUTPUT)/test_tcpnotify_user: cgroup_helpers.c trace_helpers.c testing_helpers.o
> > -$(OUTPUT)/get_cgroup_id_user: cgroup_helpers.c testing_helpers.o
> > -$(OUTPUT)/test_cgroup_storage: cgroup_helpers.c testing_helpers.o
> > -$(OUTPUT)/test_sock_fields: cgroup_helpers.c testing_helpers.o
> > -$(OUTPUT)/test_sysctl: cgroup_helpers.c testing_helpers.o
> > -$(OUTPUT)/test_tag: testing_helpers.o
> > -$(OUTPUT)/test_lirc_mode2_user: testing_helpers.o
> > -$(OUTPUT)/xdping: testing_helpers.o
> > -$(OUTPUT)/flow_dissector_load: testing_helpers.o
> > -$(OUTPUT)/test_maps: testing_helpers.o
> > -$(OUTPUT)/test_verifier: testing_helpers.o
> > +$(OUTPUT)/test_dev_cgroup: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_skb_cgroup_id_user: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_sock: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_sock_addr: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_sockmap: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_tcpnotify_user: cgroup_helpers.c trace_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/get_cgroup_id_user: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_cgroup_storage: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_sock_fields: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_sysctl: cgroup_helpers.c $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_tag: $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_lirc_mode2_user: $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/xdping: $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/flow_dissector_load: $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_maps: $(OUTPUT)/testing_helpers.o
> > +$(OUTPUT)/test_verifier: $(OUTPUT)/testing_helpers.o
> >
> >  BPFTOOL ?= $(DEFAULT_BPFTOOL)
> >  $(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile)    \
> > --
> > 2.34.0
> >



[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