diff mbox

RFC: test-in-container vs ld.so

Message ID xnv9rtq5zy.fsf@greed.delorie.com
State New
Headers show

Commit Message

DJ Delorie Nov. 8, 2019, 11:54 p.m. UTC
This patch seems to work, but we don't have a lot of containerized
tests, and my setup is "normal" (esp compared to Joseph's ;)

Comments

Carlos O'Donell Nov. 9, 2019, 1:24 p.m. UTC | #1
On 11/8/19 6:54 PM, DJ Delorie wrote:
> 
> This patch seems to work, but we don't have a lot of containerized
> tests, and my setup is "normal" (esp compared to Joseph's ;)
> 
> diff --git a/Rules b/Rules
> index 8dbac56ce6..9ca5e14092 100644
> --- a/Rules
> +++ b/Rules
> @@ -275,8 +275,8 @@ $(objpfx)%.out: /dev/null $(objpfx)%	# Make it 2nd arg for canned sequence.
>  # tests-container.
>  $(tests-container:%=$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)%
>  	$(test-wrapper-env) $(run-program-env) $(run-via-rtld-prefix) \
> -	  $(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) \
> -	  $(host-test-program-cmd) $($*-ARGS) > $@; \
> +	  $(common-objpfx)support/test-container env $($*-ENV) \
> +	  $(built-program-file) $($*-ARGS) > $@; \
>  	$(evaluate-test)
>  
>  
> 

FWIW, that looks good to me.

You could just propose this as a patch and we could try to run with it
and see what happens.

We don't have a multi-target tester, except for the build bots but they
are not well maintained at this point (we'd like to fix this, but that
will take time).
Florian Weimer Nov. 9, 2019, 2:05 p.m. UTC | #2
* DJ Delorie:

> This patch seems to work, but we don't have a lot of containerized
> tests, and my setup is "normal" (esp compared to Joseph's ;)
>
> diff --git a/Rules b/Rules
> index 8dbac56ce6..9ca5e14092 100644
> --- a/Rules
> +++ b/Rules
> @@ -275,8 +275,8 @@ $(objpfx)%.out: /dev/null $(objpfx)%	# Make it 2nd arg for canned sequence.
>  # tests-container.
>  $(tests-container:%=$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)%
>  	$(test-wrapper-env) $(run-program-env) $(run-via-rtld-prefix) \
> -	  $(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) \
> -	  $(host-test-program-cmd) $($*-ARGS) > $@; \
> +	  $(common-objpfx)support/test-container env $($*-ENV) \
> +	  $(built-program-file) $($*-ARGS) > $@; \
>  	$(evaluate-test)

I think it's a step in the right direction.  The outer
$(run-program-env) is still inherited by the test, and that will need
fixing, too.
diff mbox

Patch

diff --git a/Rules b/Rules
index 8dbac56ce6..9ca5e14092 100644
--- a/Rules
+++ b/Rules
@@ -275,8 +275,8 @@  $(objpfx)%.out: /dev/null $(objpfx)%	# Make it 2nd arg for canned sequence.
 # tests-container.
 $(tests-container:%=$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)%
 	$(test-wrapper-env) $(run-program-env) $(run-via-rtld-prefix) \
-	  $(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) \
-	  $(host-test-program-cmd) $($*-ARGS) > $@; \
+	  $(common-objpfx)support/test-container env $($*-ENV) \
+	  $(built-program-file) $($*-ARGS) > $@; \
 	$(evaluate-test)