diff mbox series

x86-64: Update tst-glibc-hwcaps-2.c for x86-64 baseline

Message ID 20210122004913.1395310-1-hjl.tools@gmail.com
State Committed
Commit f5432595008a4bf0158b27d90500b2d15fc74482
Headers show
Series x86-64: Update tst-glibc-hwcaps-2.c for x86-64 baseline | expand

Commit Message

H.J. Lu Jan. 22, 2021, 12:49 a.m. UTC
Return EXIT_FAILURE only if the level 2 libx86-64-isa-level.so is used
on x86-64 baseline machine.
---
 sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

H.J. Lu Jan. 22, 2021, 3:01 p.m. UTC | #1
On Thu, Jan 21, 2021 at 4:49 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Return EXIT_FAILURE only if the level 2 libx86-64-isa-level.so is used
> on x86-64 baseline machine.
> ---
>  sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c b/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
> index 2d8f7ec462..b223420089 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
> +++ b/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
> @@ -51,7 +51,7 @@ do_test (void)
>      case 2:
>        /* The default libx86-64-isa-level.so is used.  */
>        printf ("The default shared library is used.\n");
> -      if (has_isa_v3 || has_isa_v4 || !has_isa_v2)
> +      if (has_isa_v3 || has_isa_v4 || (!has_isa_v2 && level == 2))
>         ret = EXIT_FAILURE;
>        else
>         ret = EXIT_SUCCESS;
> --
> 2.29.2
>

I am checking it in.
Adhemerval Zanella Jan. 22, 2021, 4:56 p.m. UTC | #2
On 22/01/2021 12:01, H.J. Lu via Libc-alpha wrote:
> On Thu, Jan 21, 2021 at 4:49 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> Return EXIT_FAILURE only if the level 2 libx86-64-isa-level.so is used
>> on x86-64 baseline machine.
>> ---
>>  sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c b/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
>> index 2d8f7ec462..b223420089 100644
>> --- a/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
>> +++ b/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
>> @@ -51,7 +51,7 @@ do_test (void)
>>      case 2:
>>        /* The default libx86-64-isa-level.so is used.  */
>>        printf ("The default shared library is used.\n");
>> -      if (has_isa_v3 || has_isa_v4 || !has_isa_v2)
>> +      if (has_isa_v3 || has_isa_v4 || (!has_isa_v2 && level == 2))
>>         ret = EXIT_FAILURE;
>>        else
>>         ret = EXIT_SUCCESS;
>> --
>> 2.29.2

Ok for 2.33.
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c b/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
index 2d8f7ec462..b223420089 100644
--- a/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
+++ b/sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c
@@ -51,7 +51,7 @@  do_test (void)
     case 2:
       /* The default libx86-64-isa-level.so is used.  */
       printf ("The default shared library is used.\n");
-      if (has_isa_v3 || has_isa_v4 || !has_isa_v2)
+      if (has_isa_v3 || has_isa_v4 || (!has_isa_v2 && level == 2))
 	ret = EXIT_FAILURE;
       else
 	ret = EXIT_SUCCESS;