* [LTP] [PATCH v1] ld01.sh: Relax grep pattern for linker error message
@ 2026-04-27 0:56 Wei Gao via ltp
2026-04-27 2:41 ` Li Wang
0 siblings, 1 reply; 3+ messages in thread
From: Wei Gao via ltp @ 2026-04-27 0:56 UTC (permalink / raw)
To: ltp
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH v1] ld01.sh: Relax grep pattern for linker error message
2026-04-27 0:56 [LTP] [PATCH v1] ld01.sh: Relax grep pattern for linker error message Wei Gao via ltp
@ 2026-04-27 2:41 ` Li Wang
2026-04-28 12:07 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2026-04-27 2:41 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Merged, thanks!
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH v1] ld01.sh: Relax grep pattern for linker error message
2026-04-27 2:41 ` Li Wang
@ 2026-04-28 12:07 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2026-04-28 12:07 UTC (permalink / raw)
To: Wei Gao, ltp
Hi all,
> Merged, thanks!
FYI, while checking that error message should contain argv[0] is not much
related to ld functionality, but it found a real bug [1] (which I suppose it
will be fixed) caused by the alternatives -> libalts switch.
Kind regards,
Petr
[1] https://bugzilla.opensuse.org/show_bug.cgi?id=1262785
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-28 12:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 0:56 [LTP] [PATCH v1] ld01.sh: Relax grep pattern for linker error message Wei Gao via ltp
2026-04-27 2:41 ` Li Wang
2026-04-28 12:07 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox