From: Wei Gao via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v1] ld01.sh: Relax grep pattern for linker error message
Date: Mon, 27 Apr 2026 00:56:56 +0000 [thread overview]
Message-ID: <20260427005658.31295-1-wegao@suse.com> (raw)
The test was failing on systems (like openSUSE-Tumbleweed) where the
linker identifies itself as '/usr/bin/ld.bfd:' instead of the expected
'ld:'.
ld01 5 TPASS: ld -Bdynamic -shared main.o f1.o rf1.o -o test.so -L/usr/lib/ passed as expected
ld01 5 TPASS: ld -Bstatic -r main.o f1.o rf1.o test.so -L/usr/lib/ 2> ld.out failed as expected
/usr/bin/ld.bfd: attempted static link of dynamic object `test.so'
ld01 5 TFAIL: Unexpected error message
Relax the grep pattern to search for the core error message
'attempted static link of dynamic object' without requiring the
binary name prefix.
Signed-off-by: Wei Gao <wegao@suse.com>
---
testcases/commands/ld/ld01.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/commands/ld/ld01.sh b/testcases/commands/ld/ld01.sh
index c8ba4fc1c..a0fbf9631 100755
--- a/testcases/commands/ld/ld01.sh
+++ b/testcases/commands/ld/ld01.sh
@@ -69,7 +69,7 @@ test5()
EXPECT_FAIL $LD -Bstatic -r main.o f1.o rf1.o test.so -L/usr/lib/ 2\> ld.out
cat ld.out
- if grep -q "$LD: attempted static link of dynamic object" ld.out; then
+ if grep -q "attempted static link of dynamic object" ld.out; then
tst_res TPASS "Got expected error message"
else
tst_res TFAIL "Unexpected error message"
--
2.52.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2026-04-27 0:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 0:56 Wei Gao via ltp [this message]
2026-04-27 2:41 ` [LTP] [PATCH v1] ld01.sh: Relax grep pattern for linker error message Li Wang
2026-04-28 12:07 ` Petr Vorel
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=20260427005658.31295-1-wegao@suse.com \
--to=ltp@lists.linux.it \
--cc=wegao@suse.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