All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Alexander Spyridakis <a.spyridakis@virtualopensystems.com>
Cc: mttcg@greensocs.com, "KVM General" <kvm@vger.kernel.org>,
	"Mark Burton" <mark.burton@greensocs.com>,
	"Claudio Fontana" <claudio.fontana@huawei.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Alvise Rigo" <a.rigo@virtualopensystems.com>,
	"Jani Kokkonen" <Jani.Kokkonen@huawei.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"KONRAD Frédéric" <fred.konrad@greensocs.com>
Subject: Re: [kvm-unit-tests PATCH 2/2] arm/arm64 config: Fix arch_clean rule
Date: Mon, 7 Sep 2015 16:37:33 +0200	[thread overview]
Message-ID: <20150907143733.GF3014@hawk.localdomain> (raw)
In-Reply-To: <CAJRNFKLecMMBi9ApQsY1DUyKRcejfUW4bu5Nz8JbQZ3pcmoHrg@mail.gmail.com>

On Mon, Sep 07, 2015 at 03:35:19PM +0200, Alexander Spyridakis wrote:
> On 4 September 2015 at 16:05, Andrew Jones <drjones@redhat.com> wrote:
> > This doesn't reproduce for me. I did the following, and it worked
> > fine.
> >
> > make distclean
> > ./configure --arch=arm --cross-prefix=arm-linux-gnu-
> > make
> > ./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu-
> > make clean && make
> 
> Ok I think I found the issue:
> 
> config-arm-common.mak:
> >arm_clean: libfdt_clean asm_offsets_clean
> >    $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \
> >          $(TEST_DIR)/.*.d lib/arm/.*.d
> 
> config-x86-common.mak:
> >arch_clean:
> >    $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \
> >    $(TEST_DIR)/.*.d lib/x86/.*.d
> 
> I think the arm case tries to be too clever and on many systems it
> fails (tested on debian:jessie,sid and ubuntu:14.04,15.04). Basically
> the expression for the arm case fails to resolve, while using the
> simpler x86 way works as expected.
> 
> So is the following change acceptable in config-arm-common.mak?
> > arm_clean: libfdt_clean asm_offsets_clean
> >-       $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \
> >-             $(TEST_DIR)/.*.d lib/arm/.*.d
> >+       $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \
> >+               $(libeabi) $(eabiobjs) $(TEST_DIR)/.*.d lib/arm/.*.d

Ah, it's a dash vs. bash thing. Either we need to change all bashisms
in the makefiles, or, since kvm-unit-tests already depends on bash for
its scripts, then we might as well just tell make to use it too.  This
patch will fix it

diff --git a/Makefile b/Makefile
index 0d5933474cd8c..3e60b4f8e4a57 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
 
+SHELL := /bin/bash
+
 ifeq ($(wildcard config.mak),)
 $(error run ./configure first. See ./configure -h)
 endif

I'll probably submit the patch in a second.

Thanks for hunting down the problem!

drew

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <drjones@redhat.com>
To: Alexander Spyridakis <a.spyridakis@virtualopensystems.com>
Cc: mttcg@greensocs.com, "KVM General" <kvm@vger.kernel.org>,
	"Mark Burton" <mark.burton@greensocs.com>,
	"Claudio Fontana" <claudio.fontana@huawei.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Alvise Rigo" <a.rigo@virtualopensystems.com>,
	"Jani Kokkonen" <Jani.Kokkonen@huawei.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"KONRAD Frédéric" <fred.konrad@greensocs.com>
Subject: Re: [Qemu-devel] [kvm-unit-tests PATCH 2/2] arm/arm64 config: Fix arch_clean rule
Date: Mon, 7 Sep 2015 16:37:33 +0200	[thread overview]
Message-ID: <20150907143733.GF3014@hawk.localdomain> (raw)
In-Reply-To: <CAJRNFKLecMMBi9ApQsY1DUyKRcejfUW4bu5Nz8JbQZ3pcmoHrg@mail.gmail.com>

On Mon, Sep 07, 2015 at 03:35:19PM +0200, Alexander Spyridakis wrote:
> On 4 September 2015 at 16:05, Andrew Jones <drjones@redhat.com> wrote:
> > This doesn't reproduce for me. I did the following, and it worked
> > fine.
> >
> > make distclean
> > ./configure --arch=arm --cross-prefix=arm-linux-gnu-
> > make
> > ./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu-
> > make clean && make
> 
> Ok I think I found the issue:
> 
> config-arm-common.mak:
> >arm_clean: libfdt_clean asm_offsets_clean
> >    $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \
> >          $(TEST_DIR)/.*.d lib/arm/.*.d
> 
> config-x86-common.mak:
> >arch_clean:
> >    $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \
> >    $(TEST_DIR)/.*.d lib/x86/.*.d
> 
> I think the arm case tries to be too clever and on many systems it
> fails (tested on debian:jessie,sid and ubuntu:14.04,15.04). Basically
> the expression for the arm case fails to resolve, while using the
> simpler x86 way works as expected.
> 
> So is the following change acceptable in config-arm-common.mak?
> > arm_clean: libfdt_clean asm_offsets_clean
> >-       $(RM) $(TEST_DIR)/*.{o,flat,elf} $(libeabi) $(eabiobjs) \
> >-             $(TEST_DIR)/.*.d lib/arm/.*.d
> >+       $(RM) $(TEST_DIR)/*.o $(TEST_DIR)/*.flat $(TEST_DIR)/*.elf \
> >+               $(libeabi) $(eabiobjs) $(TEST_DIR)/.*.d lib/arm/.*.d

Ah, it's a dash vs. bash thing. Either we need to change all bashisms
in the makefiles, or, since kvm-unit-tests already depends on bash for
its scripts, then we might as well just tell make to use it too.  This
patch will fix it

diff --git a/Makefile b/Makefile
index 0d5933474cd8c..3e60b4f8e4a57 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
 
+SHELL := /bin/bash
+
 ifeq ($(wildcard config.mak),)
 $(error run ./configure first. See ./configure -h)
 endif

I'll probably submit the patch in a second.

Thanks for hunting down the problem!

drew

  reply	other threads:[~2015-09-07 14:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02  9:25 [kvm-unit-tests PATCH 0/2] arm/arm64: Add self-modifying code test case Alexander Spyridakis
2015-09-02  9:25 ` [Qemu-devel] " Alexander Spyridakis
2015-09-02  9:25 ` [kvm-unit-tests PATCH 1/2] arm/arm64: Add self-modifying code test Alexander Spyridakis
2015-09-02  9:25   ` [Qemu-devel] " Alexander Spyridakis
2015-09-02  9:25 ` [kvm-unit-tests PATCH 2/2] arm/arm64 config: Fix arch_clean rule Alexander Spyridakis
2015-09-02  9:25   ` [Qemu-devel] " Alexander Spyridakis
2015-09-04 10:48   ` Andrew Jones
2015-09-04 13:48     ` Alexander Spyridakis
2015-09-04 13:48       ` Alexander Spyridakis
2015-09-04 14:05       ` Andrew Jones
2015-09-04 14:18         ` Peter Maydell
2015-09-04 14:18           ` Peter Maydell
2015-09-04 14:53         ` Alexander Spyridakis
2015-09-04 14:53           ` Alexander Spyridakis
2015-09-07 13:35         ` Alexander Spyridakis
2015-09-07 13:35           ` Alexander Spyridakis
2015-09-07 14:37           ` Andrew Jones [this message]
2015-09-07 14:37             ` Andrew Jones
2015-09-07 14:59             ` Alexander Spyridakis
2015-09-07 14:59               ` Alexander Spyridakis
2015-09-04 13:53     ` Alexander Spyridakis
2015-09-04 13:53       ` Alexander Spyridakis
2015-09-04 14:08       ` Andrew Jones
2015-09-04 14:08         ` Andrew Jones

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=20150907143733.GF3014@hawk.localdomain \
    --to=drjones@redhat.com \
    --cc=Jani.Kokkonen@huawei.com \
    --cc=a.rigo@virtualopensystems.com \
    --cc=a.spyridakis@virtualopensystems.com \
    --cc=alex.bennee@linaro.org \
    --cc=claudio.fontana@huawei.com \
    --cc=fred.konrad@greensocs.com \
    --cc=kvm@vger.kernel.org \
    --cc=mark.burton@greensocs.com \
    --cc=mttcg@greensocs.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.