DPDK patches and discussions
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: dev@dpdk.org
Cc: Neil Horman <nhorman@tuxdriver.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH] check-experimental-syms.sh: prevent symbol matches on substrings
Date: Wed, 10 Oct 2018 10:29:28 -0400	[thread overview]
Message-ID: <20181010142928.11274-1-nhorman@tuxdriver.com> (raw)

Thomas attempted to submit this:
https://patches.dpdk.org/patch/46311/

The other day, because the other patches being submitted with it were
breaking on a false positive from the check-experimental-syms check.

The problem was that the experimental symbol check script matched on the
regexs "\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
substring matches, and librte_ethdev recently introduced symbols that
are leading substrings of one another (e.g. symbol foo is a substring of
symbol foobar), and so we would match on symbols when we shouldn't

Instead of dropping the check, fix this properly by matching
additionally on the end of line so that symbols are an exact match.

Confirmed to build properly on Thomas' submitted patch set with the
experimental check patch reverted (so that the checking actually
happens)

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas@monjalon.net>
CC: Ferruh Yigit <ferruh.yigit@intel.com>
---
 buildtools/check-experimental-syms.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
index 5bc8cda17..d0915102d 100755
--- a/buildtools/check-experimental-syms.sh
+++ b/buildtools/check-experimental-syms.sh
@@ -16,9 +16,9 @@ for i in `awk 'BEGIN {found=0}
 		/.*;/ {if (found == 1) print $1}' $MAPFILE`
 do
 	SYM=`echo $i | sed -e"s/;//"`
-	objdump -t $OBJFILE | grep -q "\.text.*$SYM"
+	objdump -t $OBJFILE | grep -q "\.text.*$SYM$"
 	IN_TEXT=$?
-	objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM"
+	objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM$"
 	IN_EXP=$?
 	if [ $IN_TEXT -eq 0 -a $IN_EXP -ne 0 ]
 	then
-- 
2.17.1

             reply	other threads:[~2018-10-10 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 14:29 Neil Horman [this message]
2018-10-10 14:43 ` Thomas Monjalon
2018-10-10 20:19   ` Neil Horman
2018-10-11 11:59     ` Thomas Monjalon

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=20181010142928.11274-1-nhorman@tuxdriver.com \
    --to=nhorman@tuxdriver.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /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 NNTP newsgroup(s).