This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linux-pid-attach.c on non-Linux hosts


On Wed, 2014-04-23 at 00:54 +0200, Kurt Roeckx wrote:
> On Wed, Apr 23, 2014 at 12:26:53AM +0200, Mark Wielaard wrote:
> > On Tue, 2014-04-22 at 21:52 +0200, Kurt Roeckx wrote:
> > > The attached patch seems to be working for me on kFreeBSD.
> > 
> > Looks reasonable to me. The other arch backends that provide an initregs
> > could probably use the same conditional (but that can wait till someone
> > actually needs it/can test it).
> > 
> > Would you mind looking at the CONTRIBUTING file and add a Signed-off-by
> > line if you agree with what is said there?
> 
> I forgot to add it, I only remembered after I mailed it.

Thanks, I have added it to the commit and pushed it to master. I am
afraid we will have to rely a little on you to make sure other stuff
doesn't break on non-GNU/Linux setups.

> > > PS: run-nm-self.sh fails for me for current master.
> > 
> > How does it fail? Do you have a tests/run-nm-self.sh.log? Which arch?
> 
> File is attached.  This is on x86_64.

Aha. I think this is because you are using a /bin/sh that isn't bash and
has a 'test' that doesn't recognize '==' as string comparison. It should
use a single '='. Does the attach fix it for you?

Cheers,

Mark
>From 4233ec036ba079468456935af6345fbc6c39c1df Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 23 Apr 2014 09:54:30 +0200
Subject: [PATCH] tests: run-nm-self.sh use test = not == for string comparisons.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
 tests/ChangeLog      |    4 ++++
 tests/run-nm-self.sh |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index afec07f..fc96284 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-23  Mark Wielaard  <mjw@redhat.com>
+
+	* run-nm-self.sh: Use test = not == for string comparisons.
+
 2014-03-14  Mark Wielaard  <mjw@redhat.com>
 
 	* Makefile.am: Remove MUDFLAP conditions. Remove libmudflap from all
diff --git a/tests/run-nm-self.sh b/tests/run-nm-self.sh
index dac8e27..6a31afc 100755
--- a/tests/run-nm-self.sh
+++ b/tests/run-nm-self.sh
@@ -27,7 +27,7 @@ for what_arg in --debug-syms --defined-only --dynamic --extern-only; do
     for out_arg in --numeric-sort --no-sort --reverse-sort; do
       for self_file in $ET_REL $ET_EXEC $ET_DYN; do
 	# --dynamic doesn't make sense for ET_REL.
-	if ! test "$what_arg" == "--dynamic" -a "$self_file" == "$ET_REL"; then
+	if ! test "$what_arg" = "--dynamic" -a "$self_file" = "$ET_REL"; then
 	  testrun ${abs_top_builddir}/src/nm $what_arg $format_arg $out_arg $self_file > /dev/null
 	fi
       done
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]