All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build
@ 2019-04-30 13:38 Cyril Hrubis
  2019-04-30 13:38 ` [LTP] [PATCH 2/2] Makefile: Fix target redefinition Cyril Hrubis
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Cyril Hrubis @ 2019-04-30 13:38 UTC (permalink / raw)
  To: ltp

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(-)

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


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

* [LTP] [PATCH 2/2] Makefile: Fix target redefinition
  2019-04-30 13:38 [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build Cyril Hrubis
@ 2019-04-30 13:38 ` Cyril Hrubis
  2019-04-30 13:52   ` Petr Vorel
  2019-04-30 13:51 ` [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build Jan Stancek
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2019-04-30 13:38 UTC (permalink / raw)
  To: ltp

There is no need to add a rule for the libs directory because there is a
generic rule for directory creation already. All we need to do is to
make the libs-all target depend on the directory path, which we do
already so that the directory is created before we attempt to execute
make there.

Fixes: 17a5b0fb63bf65eff433bdee3bf5f73826a50e0f

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
CC: Petr Vorel <pvorel@suse.cz>
CC: Jan Stancek <jstancek@redhat.com>
---
 Makefile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Makefile b/Makefile
index c46d050ce..768ca4606 100644
--- a/Makefile
+++ b/Makefile
@@ -102,9 +102,6 @@ $(sort $(addprefix $(abs_top_builddir)/,$(BOOTSTRAP_TARGETS)) $(INSTALL_DIR) $(D
 ## Pattern based subtarget rules.
 lib-install: lib-all
 
-$(abs_top_builddir)/libs:
-	mkdir -m 00755 -p "$@"
-
 libs-all: $(abs_top_builddir)/libs
 
 $(MAKE_TARGETS) include-all lib-all libs-all:
-- 
2.19.2


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

* [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build
  2019-04-30 13:38 [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build Cyril Hrubis
  2019-04-30 13:38 ` [LTP] [PATCH 2/2] Makefile: Fix target redefinition Cyril Hrubis
@ 2019-04-30 13:51 ` Jan Stancek
  2019-04-30 13:51 ` Petr Vorel
  2019-04-30 14:16 ` Cyril Hrubis
  3 siblings, 0 replies; 7+ messages in thread
From: Jan Stancek @ 2019-04-30 13:51 UTC (permalink / raw)
  To: ltp


----- 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
> 
> 

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

* [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build
  2019-04-30 13:38 [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build Cyril Hrubis
  2019-04-30 13:38 ` [LTP] [PATCH 2/2] Makefile: Fix target redefinition Cyril Hrubis
  2019-04-30 13:51 ` [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build Jan Stancek
@ 2019-04-30 13:51 ` Petr Vorel
  2019-04-30 14:16 ` Cyril Hrubis
  3 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2019-04-30 13:51 UTC (permalink / raw)
  To: ltp

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))

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

* [LTP] [PATCH 2/2] Makefile: Fix target redefinition
  2019-04-30 13:38 ` [LTP] [PATCH 2/2] Makefile: Fix target redefinition Cyril Hrubis
@ 2019-04-30 13:52   ` Petr Vorel
  0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2019-04-30 13:52 UTC (permalink / raw)
  To: ltp

Hi,

> There is no need to add a rule for the libs directory because there is a
> generic rule for directory creation already. All we need to do is to
> make the libs-all target depend on the directory path, which we do
> already so that the directory is created before we attempt to execute
> make there.

> Fixes: 17a5b0fb63bf65eff433bdee3bf5f73826a50e0f

> 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>
The same as previous patch (testing both together).

Kind regards,
Petr

>  Makefile | 3 ---
>  1 file changed, 3 deletions(-)

> diff --git a/Makefile b/Makefile
> index c46d050ce..768ca4606 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -102,9 +102,6 @@ $(sort $(addprefix $(abs_top_builddir)/,$(BOOTSTRAP_TARGETS)) $(INSTALL_DIR) $(D
>  ## Pattern based subtarget rules.
>  lib-install: lib-all

> -$(abs_top_builddir)/libs:
> -	mkdir -m 00755 -p "$@"
> -
>  libs-all: $(abs_top_builddir)/libs

>  $(MAKE_TARGETS) include-all lib-all libs-all:

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

* [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build
  2019-04-30 13:38 [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build Cyril Hrubis
                   ` (2 preceding siblings ...)
  2019-04-30 13:51 ` Petr Vorel
@ 2019-04-30 14:16 ` Cyril Hrubis
  2019-05-01  0:01   ` Enji Cooper
  3 siblings, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2019-04-30 14:16 UTC (permalink / raw)
  To: ltp

Hi!
Both pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build
  2019-04-30 14:16 ` Cyril Hrubis
@ 2019-05-01  0:01   ` Enji Cooper
  0 siblings, 0 replies; 7+ messages in thread
From: Enji Cooper @ 2019-05-01  0:01 UTC (permalink / raw)
  To: ltp


> 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

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

end of thread, other threads:[~2019-05-01  0:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 13:38 [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build Cyril Hrubis
2019-04-30 13:38 ` [LTP] [PATCH 2/2] Makefile: Fix target redefinition Cyril Hrubis
2019-04-30 13:52   ` Petr Vorel
2019-04-30 13:51 ` [LTP] [PATCH 1/2] testcases.mk: Fix libs/ path for out-of-tree build Jan Stancek
2019-04-30 13:51 ` Petr Vorel
2019-04-30 14:16 ` Cyril Hrubis
2019-05-01  0:01   ` Enji Cooper

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.