public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Simplify scripts/cross-test-ssh.sh configuration.
@ 2022-12-21 22:36 Carlos O'Donell
  2022-12-22  7:15 ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Carlos O'Donell @ 2022-12-21 22:36 UTC (permalink / raw)
  To: libc-alpha, fweimer; +Cc: Carlos O'Donell

With modern ssh clients and daemons it is required to use AcceptEnv and
SendEnv configuration options to correctly support testing the DSO sort
ordering tests.  This requirement is present because
scripts/dso-ordering-test.py injects GLIBC_TUNABLES to the left of the
${test_wrapper_env} and so it must both be sent by the ssh client and
accepted by the ssh daemon.  This requirement is removed in this change
and the injected GLIBC_TUNABLES is placed after ${run_program_env} and
so still correctly provides the override that the test requires.
This is similar to existing tests like elf/tst-pathopt.sh,
elf/tst-rtld-load-self.sh, and locale/tst-locale-locpath.sh.

Tested that it fixes two failures when cross-testing on aarch64 with
scripts/cross-test-ssh.sh and an ssh client and daemon that do not pass
GLIBC_TUNABLES. Without this fix such a configuration will report the
following failures (since the GLIBC_TUNABLES not preserved):
FAIL: elf/tst-bz15311
FAIL: elf/tst-bz28937

Tested without regression on native x86_64 and aarch64 builds.
---
 scripts/dso-ordering-test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/dso-ordering-test.py b/scripts/dso-ordering-test.py
index b87cf2f809..7c29c21632 100644
--- a/scripts/dso-ordering-test.py
+++ b/scripts/dso-ordering-test.py
@@ -745,7 +745,7 @@ def process_testcase(t):
                                  if tunable_env else "")
                 # Write out fragment of shell script for this single test.
                 test_descr.sh.write \
-                    ("%s${test_wrapper_env} ${run_program_env} \\\n"
+                    ("${test_wrapper_env} ${run_program_env} %s\\\n"
                      "${common_objpfx}support/test-run-command \\\n"
                      "${common_objpfx}elf/ld.so \\\n"
                      "--library-path ${common_objpfx}elf/%s:"
-- 
2.38.1


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

* Re: [PATCH] Simplify scripts/cross-test-ssh.sh configuration.
  2022-12-21 22:36 [PATCH] Simplify scripts/cross-test-ssh.sh configuration Carlos O'Donell
@ 2022-12-22  7:15 ` Florian Weimer
  2022-12-22 16:09   ` Carlos O'Donell
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2022-12-22  7:15 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: libc-alpha

* Carlos O'Donell:

> With modern ssh clients and daemons it is required to use AcceptEnv and
> SendEnv configuration options to correctly support testing the DSO sort
> ordering tests.  This requirement is present because
> scripts/dso-ordering-test.py injects GLIBC_TUNABLES to the left of the
> ${test_wrapper_env} and so it must both be sent by the ssh client and
> accepted by the ssh daemon.  This requirement is removed in this change
> and the injected GLIBC_TUNABLES is placed after ${run_program_env} and
> so still correctly provides the override that the test requires.
> This is similar to existing tests like elf/tst-pathopt.sh,
> elf/tst-rtld-load-self.sh, and locale/tst-locale-locpath.sh.
>
> Tested that it fixes two failures when cross-testing on aarch64 with
> scripts/cross-test-ssh.sh and an ssh client and daemon that do not pass
> GLIBC_TUNABLES. Without this fix such a configuration will report the
> following failures (since the GLIBC_TUNABLES not preserved):
> FAIL: elf/tst-bz15311
> FAIL: elf/tst-bz28937

Nice explanation in the commit message.  Looks okay to me.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian


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

* Re: [PATCH] Simplify scripts/cross-test-ssh.sh configuration.
  2022-12-22  7:15 ` Florian Weimer
@ 2022-12-22 16:09   ` Carlos O'Donell
  0 siblings, 0 replies; 3+ messages in thread
From: Carlos O'Donell @ 2022-12-22 16:09 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

On 12/22/22 02:15, Florian Weimer wrote:
> * Carlos O'Donell:
> 
>> With modern ssh clients and daemons it is required to use AcceptEnv and
>> SendEnv configuration options to correctly support testing the DSO sort
>> ordering tests.  This requirement is present because
>> scripts/dso-ordering-test.py injects GLIBC_TUNABLES to the left of the
>> ${test_wrapper_env} and so it must both be sent by the ssh client and
>> accepted by the ssh daemon.  This requirement is removed in this change
>> and the injected GLIBC_TUNABLES is placed after ${run_program_env} and
>> so still correctly provides the override that the test requires.
>> This is similar to existing tests like elf/tst-pathopt.sh,
>> elf/tst-rtld-load-self.sh, and locale/tst-locale-locpath.sh.
>>
>> Tested that it fixes two failures when cross-testing on aarch64 with
>> scripts/cross-test-ssh.sh and an ssh client and daemon that do not pass
>> GLIBC_TUNABLES. Without this fix such a configuration will report the
>> following failures (since the GLIBC_TUNABLES not preserved):
>> FAIL: elf/tst-bz15311
>> FAIL: elf/tst-bz28937
> 
> Nice explanation in the commit message.  Looks okay to me.
> 
> Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks. Pushed.

-- 
Cheers,
Carlos.


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

end of thread, other threads:[~2022-12-22 16:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-21 22:36 [PATCH] Simplify scripts/cross-test-ssh.sh configuration Carlos O'Donell
2022-12-22  7:15 ` Florian Weimer
2022-12-22 16:09   ` Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).