From: Simon Marchi <simark@simark.ca>
To: Carl Love <cel@us.ibm.com>, gdb-patches@sourceware.org
Cc: Rogerio Alves <rogealve@br.ibm.com>
Subject: Re: [PATCH] gdb fix for catch-syscall.exp
Date: Thu, 18 Nov 2021 13:10:27 -0500 [thread overview]
Message-ID: <d2a1d3c0-5dee-de59-5382-213bb1815f65@simark.ca> (raw)
In-Reply-To: <3b8e450b9fb4f4bec97a6bfbe6e6a4816be780ee.camel@us.ibm.com>
On 2021-11-17 6:30 p.m., Carl Love via Gdb-patches wrote:
> GDB maintainers:
>
> The following patch fixes three test failures and an expect error. The
> expect error ERROR: can't read "arch1": no such variable is the result
> of the if/else statement in proc test_catch_syscall_multi_arch not
> matching the power platform. The power platform, starting with Power
> 8, has "le" in the platform string to indicate a Little Endian system.
> The current expect string doesn't match the "le" in the name.
>
> The other three failures are the result of the execve instruction that
> starts executing the new program. The expect script is looking for the
> return from the execve command which doesn't occur since execve
> replaces the current process image.
>
> The patch was tested on a Power 10 LE system with no regressions.
>
> Please let me know if the patch is acceptable for mainline. Thanks.
>
> Carl
>
>
> -------------------------------------------------------------------
> gdb fix for catch-syscall.exp
>
> Remove check_continue "execve" from Proc test_catch_syscall_execve.
>
> The check_continue proceedure checs that the command, execve, starts and
> checks for the return from the command. The execve command starts a new
> program and thus the return from the command causing the test to fail.
>
> The call to proc check_continue "execve" is removed and replaced with
> just the call to check_call_to_syscall "execve" to verify the command
> executed. The next test in proc test_catch_syscall_execve verifies that
> the new program started and hit the break point in main.
>
> Update the check for the PowerPC architecture. Power Little Endian systems
> include "le" in the name. The istarget "power64-*-linux*" check fails to
> match LE sytems. The expected string is updated to capture both Big Endian
> and Little Endian systems. Power 10 LE istarget prints as:
> powerpc64le-unknown-linux-gnu.
>
> This patch fixes three failures and the error:
>
> ERROR: can't read "arch1": no such variable
>
> Patch tested on Power 10 ppc64le GNU/Linux platform.
> ---
> gdb/testsuite/gdb.base/catch-syscall.exp | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
> index 811a92b0aea..8b496712df5 100644
> --- a/gdb/testsuite/gdb.base/catch-syscall.exp
> +++ b/gdb/testsuite/gdb.base/catch-syscall.exp
> @@ -348,7 +348,9 @@ proc test_catch_syscall_execve {} {
> # Check for entry/return across the execve, making sure that the
> # syscall_state isn't lost when turning into a new process.
> insert_catch_syscall_with_arg "execve"
> - check_continue "execve"
> +
> + # check that the execve is called
> + check_call_to_syscall "execve"
>
> # Continue to main so extended-remote can read files as needed.
> # (Otherwise that "Reading" output confuses gdb_continue_to_end.)
> @@ -550,7 +552,7 @@ proc test_catch_syscall_multi_arch {} {
> set syscall2_name "write"
> set syscall_number 1
> } elseif { [istarget "powerpc-*-linux*"] \
> - || [istarget "powerpc64-*-linux*"] } {
> + || [istarget "powerpc64*-linux*"] } {
> set arch1 "powerpc:common"
> set arch2 "powerpc:common64"
> set syscall1_name "openat"
> --
> 2.30.2
>
>
Hi Carl,
This patch causes this failure regression on Ubuntu 20.04, amd64:
FAIL: gdb.base/catch-syscall.exp: execve: continue to main
From gdb.log:
615 continue^M
616 Continuing.^M
617 process 2022222 is executing new program: /home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/catch-syscall/catch-syscall^M
618 ^M
619 Catchpoint 18 (returned from syscall execve), 0x00007ffff7fd0100 in _start () from /lib64/ld-linux-x86-64.so.2^M
620 (gdb) FAIL: gdb.base/catch-syscall.exp: execve: continue to main
Simon
next prev parent reply other threads:[~2021-11-18 18:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 23:30 Carl Love via Gdb-patches
2021-11-18 15:23 ` Tom Tromey
2021-11-18 18:10 ` Simon Marchi [this message]
2021-11-20 0:27 ` Carl Love via Gdb-patches
2021-11-22 1:07 ` Simon Marchi via Gdb-patches
2021-11-22 18:16 ` Carl Love via Gdb-patches
2021-11-22 17:01 ` John Baldwin
2021-11-23 20:34 ` Simon Marchi
2021-11-23 22:34 ` John Baldwin
2021-11-24 17:46 ` Carl Love via Gdb-patches
2021-11-24 17:51 ` John Baldwin
2021-11-24 1:15 ` Carl Love via Gdb-patches
2021-11-24 19:29 ` Simon Marchi
2021-11-29 16:46 ` Carl Love via Gdb-patches
2021-12-02 16:32 ` Ping " Carl Love via Gdb-patches
2021-12-10 18:36 ` Simon Marchi
2021-12-10 19:59 ` [PATCH v2] " Carl Love via Gdb-patches
2021-12-11 0:21 ` Simon Marchi via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2a1d3c0-5dee-de59-5382-213bb1815f65@simark.ca \
--to=simark@simark.ca \
--cc=cel@us.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=rogealve@br.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox