stdlib: Fix tst-makecontext2 log when swapcontext fails

Message ID 20240322154919.1732176-1-shorne@gmail.com
State Committed
Commit 4a13b3ef46fc10e695630d4774af7fe4944f64ca
Headers
Series stdlib: Fix tst-makecontext2 log when swapcontext fails |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed

Commit Message

Stafford Horne March 22, 2024, 3:49 p.m. UTC
  The log incorrectly prints, setcontext failed.  Update this to indicate
that actually swapcontext failed.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 stdlib/tst-makecontext2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

H.J. Lu March 22, 2024, 5 p.m. UTC | #1
On Fri, Mar 22, 2024 at 8:50 AM Stafford Horne <shorne@gmail.com> wrote:
>
> The log incorrectly prints, setcontext failed.  Update this to indicate
> that actually swapcontext failed.
>
> Signed-off-by: Stafford Horne <shorne@gmail.com>
> ---
>  stdlib/tst-makecontext2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/stdlib/tst-makecontext2.c b/stdlib/tst-makecontext2.c
> index 5091b126a0..2434cb2af3 100644
> --- a/stdlib/tst-makecontext2.c
> +++ b/stdlib/tst-makecontext2.c
> @@ -63,7 +63,7 @@ do_test (void)
>        makecontext (&ucp, (void (*) (void)) cf, 2, 78, 274);
>        if (swapcontext (&ucp2, &ucp) != 0)
>         {
> -         puts ("setcontext failed");
> +         puts ("swapcontext failed");
>           return 1;
>         }
>
> --
> 2.44.0
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.
  

Patch

diff --git a/stdlib/tst-makecontext2.c b/stdlib/tst-makecontext2.c
index 5091b126a0..2434cb2af3 100644
--- a/stdlib/tst-makecontext2.c
+++ b/stdlib/tst-makecontext2.c
@@ -63,7 +63,7 @@  do_test (void)
       makecontext (&ucp, (void (*) (void)) cf, 2, 78, 274);
       if (swapcontext (&ucp2, &ucp) != 0)
 	{
-	  puts ("setcontext failed");
+	  puts ("swapcontext failed");
 	  return 1;
 	}