From: Maurizio Papini <mpapini@redhat.com>
To: binutils@sourceware.org
Cc: Maurizio Papini <mpapini@redhat.com>
Subject: [PATCH 2/2] addr2line: test to check -n option
Date: Mon, 19 Dec 2022 14:53:03 +0100 [thread overview]
Message-ID: <20221219135303.116222-3-mpapini@redhat.com> (raw)
In-Reply-To: <20221219135303.116222-1-mpapini@redhat.com>
---
binutils/testsuite/binutils-all/addr2line.exp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/binutils/testsuite/binutils-all/addr2line.exp b/binutils/testsuite/binutils-all/addr2line.exp
index 957ae55df33..59c0924412c 100644
--- a/binutils/testsuite/binutils-all/addr2line.exp
+++ b/binutils/testsuite/binutils-all/addr2line.exp
@@ -61,6 +61,16 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\[Tt\] ${dot}fn" $output contents] then {
pass "$testname -f option"
}
+#testcase for -n option: check the extra newline
+#Using the same fn function address used in -f option.
+ set got [binutils_run $ADDR2LINE "-n -f -e tmpdir/testprog$exe [lindex $list 0]"]
+ set want "fn\n$srcdir/$subdir/testprog.c:\[0-9\]+\n\n"
+ if ![regexp $want $got] then {
+ fail "$testname -fn option $got\n"
+ } else {
+ pass "$testname -fn option"
+ }
+
#testcase for -s option.
#Using the same fn function address used in -f option.
set got [binutils_run $ADDR2LINE "-s -e tmpdir/testprog$exe [lindex $list 0]"]
--
2.38.1
next prev parent reply other threads:[~2022-12-19 13:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 13:53 [PATCH 0/2] addr2line: new option -n to add a newline at the end Maurizio Papini
2022-12-19 13:53 ` [PATCH 1/2] " Maurizio Papini
2022-12-19 13:53 ` Maurizio Papini [this message]
2023-01-09 16:04 ` [PATCH 0/2] " Maurizio Papini
2023-01-09 16:17 ` Jan Beulich
2023-01-10 14:17 ` Maurizio Papini
2023-01-10 15:50 ` Jan Beulich
2023-01-10 12:19 ` Nick Clifton
2023-01-10 15:28 ` Maurizio Papini
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=20221219135303.116222-3-mpapini@redhat.com \
--to=mpapini@redhat.com \
--cc=binutils@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).