[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tests/misc/printenv.sh: env/printenv: reverse sort order on aarch64
From: |
Jim Meyering |
Subject: |
Re: tests/misc/printenv.sh: env/printenv: reverse sort order on aarch64 |
Date: |
Sun, 1 Feb 2015 19:43:59 -0800 |
On Sun, Feb 1, 2015 at 4:02 PM, Bernhard Voelker
<address@hidden> wrote:
> On aarch64, we're experiencing a test failure in tests/misc/printenv.sh
> on the openSUSE Build Service: the output of 'env' is sorted exactly
> in reverse order compared to that of 'printenv'.
>
> https://build.opensuse.org/package/live_build_log/Base:System/coreutils-testsuite/openSUSE_Factory_ARM/aarch64
>
> However, if I apply the following patch, then the test would succeed:
>
> https://build.opensuse.org/package/live_build_log/home:bernhard-voelker:aarch64/coreutils-testsuite/openSUSE_Factory_ARM/aarch64
>
> --- a/tests/misc/printenv.sh
> +++ b/tests/misc/printenv.sh
> @@ -23,7 +23,7 @@ print_ver_ printenv
> # printenv as a builtin, so we must invoke it via "env".
> # But beware of $_, set by many shells to the last command run.
> # Also, filter out LD_PRELOAD, which is set when running under valgrind.
> -env | grep -Ev '^(_|LD_PRELOAD=)' > exp || framework_failure_
> +env -- env | grep -Ev '^(_|LD_PRELOAD=)' > exp || framework_failure_
> env -- printenv | grep -Ev '^(_|LD_PRELOAD=)' > out || fail=1
> compare exp out || fail=1
Hi Berny,
I'd guess that the aarch64 libc's execvp reverses the order of the pointers,
which suggests we should not be relying on the order of those lines.
Also note that the grep regexp is slightly too loose: it excludes
any name that begins with "_", rather than just the one that is mentioned
in that comment.