public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jiong Wang <jiong.wang@foss.arm.com>
To: Binutils <binutils@sourceware.org>
Cc: "H.J. Lu" <hjl.tools@gmail.com>
Subject: [ld, testsuite] Relax the expectation pattern for several plugin-* tests
Date: Mon, 13 Feb 2017 16:03:00 -0000	[thread overview]
Message-ID: <355e66f1-d3f6-25e6-1f07-d60fdc7122cf@foss.arm.com> (raw)
In-Reply-To: <CAMe9rOpsjqOKz4pi9k8sCn_ESUeEnFE0zF5EsF9-74TQ4h+zRA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]

>>> hook called: all symbols read.
>>> Input: /work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c
>>> (/work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c)
>>> Sym: 'func' Resolution: LDPR_PREVAILING_DEF
>>> Sym: '_func' Resolution: LDPR_PREVAILING_DEF_IRONLY
>>> /work/fsf-trunk-3/build-arm-none-eabi/obj/binutils/ld/ld-new:
>>> /work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c (symbol
>>> from plugin)(func): warning: interworking not enabled.
>>>   first occurrence:
>>> /work/fsf-trunk-3/build-arm-none-eabi/obj/binutils/ld/tmpdir/main.o: Thumb
>>> call to ARM
>>
>> I think those failures are caused by those extra messages.
>> I am not familiar with ARM linker.  I can skip those tests
>> for ARM.
>
> It looks like an ARM linker bug.  ARM linker shouldn't complain
> anything on input BFDs with BFD_PLUGIN since it is a dummy
> input file.

Or can we simply relax the testcase expectation result a little bit while
we still keeps those essential outputs that we want to catch?

Is this patch OK for master?

IMHO, keeping the warning might be better than silently accepting it.  As the
dummy input file really doesn't have proper elf header flags.  I am not sure
if relax the checking on BFD_PLUGIN will cause hiding silent issue once there
is future change on BFD_PLUGIN.

ld/
2017-02-10  Jiong Wang  <jiong.wang@arm.com>

         * testsuite/ld-plugin/plugin-15.d: Relax the match pattern.
         * testsuite/ld-plugin/plugin-16.d: Likewise.
         * testsuite/ld-plugin/plugin-20.d: Likewise.
         * testsuite/ld-plugin/plugin-21.d: Likewise.
         * testsuite/ld-plugin/plugin-22.d: Likewise.
         * testsuite/ld-plugin/plugin-23.d: Likewise.


[-- Attachment #2: fix-test.patch --]
[-- Type: text/x-diff, Size: 3419 bytes --]

diff --git a/ld/testsuite/ld-plugin/plugin-15.d b/ld/testsuite/ld-plugin/plugin-15.d
index 0481c5fb054b257410716c5a49b4a045e280e4ce..78f168626fb76eb33595de80205a25aa301b83c8 100644
--- a/ld/testsuite/ld-plugin/plugin-15.d
+++ b/ld/testsuite/ld-plugin/plugin-15.d
@@ -28,6 +28,7 @@ hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
 hook called: claim_file tmpdir/text.o \[@0/.* not claimed
 #...
 hook called: all symbols read.
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-16.d b/ld/testsuite/ld-plugin/plugin-16.d
index ae54f0c24a1b90686e17ffc31e5dc4ab331e1e2c..a1f32a507920b72be55776614ca9f5b23d34a567 100644
--- a/ld/testsuite/ld-plugin/plugin-16.d
+++ b/ld/testsuite/ld-plugin/plugin-16.d
@@ -32,6 +32,7 @@ hook called: claim_file tmpdir/text.o \[@0/.* not claimed
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
 Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-20.d b/ld/testsuite/ld-plugin/plugin-20.d
index 373a3ff2a3b037c1959710654c17a3c4008cd8a6..28ffc46a6876c0a40b835800663fc3382ac447f9 100644
--- a/ld/testsuite/ld-plugin/plugin-20.d
+++ b/ld/testsuite/ld-plugin/plugin-20.d
@@ -2,6 +2,7 @@ hook called: all symbols read.
 Input: func.c \(tmpdir/libfunc.a\)
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-21.d b/ld/testsuite/ld-plugin/plugin-21.d
index 7b922c11e116f9f081f70782b7bdbcafb8a666bc..a5a5b59f891bf3c83d820bfba09b8765e79db402 100644
--- a/ld/testsuite/ld-plugin/plugin-21.d
+++ b/ld/testsuite/ld-plugin/plugin-21.d
@@ -2,6 +2,7 @@ hook called: all symbols read.
 Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\)
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-22.d b/ld/testsuite/ld-plugin/plugin-22.d
index 151267624f906a95d030e85efb99169810d26642..438a1f098d67596325171a2ebd08829a24ad3780 100644
--- a/ld/testsuite/ld-plugin/plugin-22.d
+++ b/ld/testsuite/ld-plugin/plugin-22.d
@@ -2,6 +2,7 @@ Claimed: tmpdir/libfunc.a \[@.*
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-23.d b/ld/testsuite/ld-plugin/plugin-23.d
index e05f7bdfcf75a94331beca610b6aac122996d9c2..c279130ffdb0be5d5392fd6d77a0189c96333951 100644
--- a/ld/testsuite/ld-plugin/plugin-23.d
+++ b/ld/testsuite/ld-plugin/plugin-23.d
@@ -2,6 +2,7 @@ Claimed: .*/ld/testsuite/ld-plugin/func.c \[@0.*
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.

  reply	other threads:[~2017-02-13 16:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 13:54 [PATCH 1/8] PR ld/17878: Add bfd_maybe_object_p H.J. Lu
2015-02-07  9:42 ` Alan Modra
2015-02-07 12:50   ` H.J. Lu
2015-02-07 19:10     ` H.J. Lu
2015-02-07 20:47       ` H.J. Lu
2015-02-07 20:51       ` H.J. Lu
2015-02-09  4:36     ` H.J. Lu
2015-02-19 16:55       ` Alex Velenko
2015-02-19 16:59         ` H.J. Lu
2015-02-19 20:10           ` H.J. Lu
2017-02-13 16:03             ` Jiong Wang [this message]
2017-02-13 16:57               ` [ld, testsuite] Relax the expectation pattern for several plugin-* tests H.J. Lu
2017-02-15 17:46                 ` Jiong Wang
2017-02-15 23:42                   ` Alan Modra
2017-02-16 10:16                     ` Jiong Wang

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=355e66f1-d3f6-25e6-1f07-d60fdc7122cf@foss.arm.com \
    --to=jiong.wang@foss.arm.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).