Message ID | 20190430133836.28400-1-chrubis@suse.cz |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] testcases.mk: Fix libs/ path for out-of-tree build | expand |
----- Original Message ----- > The path to the Makefile was not correct for the out-of-tree build > because it was pointing to the build directory rather than to the source > directory. > > Apparently this also caused random failures for out-of-tree build. For > some reason when building syscalls/set_mempolicy/ testcases the rebuild > of the libltpnuma.a library is triggered for out-of-tree build for about > 10% of the cases on massively parallel build. Which as far as I can tell > shouldn't happen since we build everything in the libs/ directory as a > prerequisite of the testcases/ directory. So there is likely some > strange race condition happening and while this does not fix the actual > race it makes it quite harmless since the target was already build and > the make in the libs/libltpnuma/ directory will be no-op. > > Signed-off-by: Cyril Hrubis <chrubis@suse.cz> > CC: Petr Vorel <pvorel@suse.cz> > CC: Jan Stancek <jstancek@redhat.com> Acked-by: Jan Stancek <jstancek@redhat.com> > --- > include/mk/testcases.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/mk/testcases.mk b/include/mk/testcases.mk > index 131854ec7..684655fbf 100644 > --- a/include/mk/testcases.mk > +++ b/include/mk/testcases.mk > @@ -49,7 +49,7 @@ LTPLIBS_FILES = $(addsuffix .a, $(addprefix > $(abs_top_builddir)/libs/, $(foreach > MAKE_DEPS += $(LTPLIBS_FILES) > > $(LTPLIBS_FILES): $(LTPLIBS_DIRS) > - $(MAKE) -C "$^" -f "$^/Makefile" all > + $(MAKE) -C "$^" -f "$(subst > $(abs_top_builddir),$(abs_top_srcdir),$^)/Makefile" all > > LDFLAGS += $(addprefix -L$(top_builddir)/libs/lib, $(LTPLIBS)) > > -- > 2.19.2 > >
Hi, > The path to the Makefile was not correct for the out-of-tree build > because it was pointing to the build directory rather than to the source > directory. > Apparently this also caused random failures for out-of-tree build. For > some reason when building syscalls/set_mempolicy/ testcases the rebuild > of the libltpnuma.a library is triggered for out-of-tree build for about > 10% of the cases on massively parallel build. Which as far as I can tell > shouldn't happen since we build everything in the libs/ directory as a > prerequisite of the testcases/ directory. So there is likely some > strange race condition happening and while this does not fix the actual > race it makes it quite harmless since the target was already build and > the make in the libs/libltpnuma/ directory will be no-op. > Signed-off-by: Cyril Hrubis <chrubis@suse.cz> > CC: Petr Vorel <pvorel@suse.cz> > CC: Jan Stancek <jstancek@redhat.com> > --- Tested-by: Petr Vorel <pvorel@suse.cz> On 32 core machine, running for several hours (now 66 builds without failure). Kind regards, Petr > include/mk/testcases.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > diff --git a/include/mk/testcases.mk b/include/mk/testcases.mk > index 131854ec7..684655fbf 100644 > --- a/include/mk/testcases.mk > +++ b/include/mk/testcases.mk > @@ -49,7 +49,7 @@ LTPLIBS_FILES = $(addsuffix .a, $(addprefix $(abs_top_builddir)/libs/, $(foreach > MAKE_DEPS += $(LTPLIBS_FILES) > $(LTPLIBS_FILES): $(LTPLIBS_DIRS) > - $(MAKE) -C "$^" -f "$^/Makefile" all > + $(MAKE) -C "$^" -f "$(subst $(abs_top_builddir),$(abs_top_srcdir),$^)/Makefile" all > LDFLAGS += $(addprefix -L$(top_builddir)/libs/lib, $(LTPLIBS))
Hi! Both pushed, thanks.
> On Apr 30, 2019, at 7:16 AM, Cyril Hrubis <chrubis@suse.cz> wrote: > > Hi! > Both pushed, thanks. Thank you for fixing this Cyril! Take care, -Enji
diff --git a/include/mk/testcases.mk b/include/mk/testcases.mk index 131854ec7..684655fbf 100644 --- a/include/mk/testcases.mk +++ b/include/mk/testcases.mk @@ -49,7 +49,7 @@ LTPLIBS_FILES = $(addsuffix .a, $(addprefix $(abs_top_builddir)/libs/, $(foreach MAKE_DEPS += $(LTPLIBS_FILES) $(LTPLIBS_FILES): $(LTPLIBS_DIRS) - $(MAKE) -C "$^" -f "$^/Makefile" all + $(MAKE) -C "$^" -f "$(subst $(abs_top_builddir),$(abs_top_srcdir),$^)/Makefile" all LDFLAGS += $(addprefix -L$(top_builddir)/libs/lib, $(LTPLIBS))
The path to the Makefile was not correct for the out-of-tree build because it was pointing to the build directory rather than to the source directory. Apparently this also caused random failures for out-of-tree build. For some reason when building syscalls/set_mempolicy/ testcases the rebuild of the libltpnuma.a library is triggered for out-of-tree build for about 10% of the cases on massively parallel build. Which as far as I can tell shouldn't happen since we build everything in the libs/ directory as a prerequisite of the testcases/ directory. So there is likely some strange race condition happening and while this does not fix the actual race it makes it quite harmless since the target was already build and the make in the libs/libltpnuma/ directory will be no-op. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> CC: Petr Vorel <pvorel@suse.cz> CC: Jan Stancek <jstancek@redhat.com> --- include/mk/testcases.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)