From: Satoru Takeuchi <satoru.takeuchi@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Satoru Takeuchi <satoru.takeuchi@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] ktest: run make mrproper not only for OUTPUT_DIR but also for BUILD_DIR to avoid build failure
Date: Sun, 02 Mar 2014 23:17:42 +0900 [thread overview]
Message-ID: <87sir0ofax.wl%satoru.takeuchi@gmail.com> (raw)
In-Reply-To: <20140302082916.58199d86@gandalf.local.home>
At Sun, 2 Mar 2014 08:29:16 -0500,
Steven Rostedt wrote:
>
> On Sun, 02 Mar 2014 21:23:36 +0900
> Satoru Takeuchi <satoru.takeuchi@gmail.com> wrote:
>
> > From: Satoru Takeuchi <satoru.takeuchi@gmail.com>
> >
> > Build failure hapens with the following log if BUILD_DIR is dirty.
>
> If you want to do make mrproper in the BUILD_DIR, add the command to
> PRE_BUILD or something. I have TAGS in my BUILD_DIRs and this will
> remove them for me. I can't accept this change.
>
> I've noticed that there's a bug in the Linux make system that causes
> the O=.. builds to fail because somehow the source directory got dirty.
> We need to figure out what that bug is.
I see. So what I should fix is kbuild system.
Thanks,
Satoru
>
> Thanks,
>
> -- Steve
>
>
> >
> > ===============================================================================
> > ...
> > RUNNING TEST 1 of 1 with option build olddefconfig
> >
> > make O=/home/sat/ktest/output mrproper ... CLEAN arch/x86/tools
> > CLEAN scripts/basic
> > CLEAN scripts/kconfig
> > CLEAN include/config include/generated arch/x86/include/generated
> > CLEAN .config.old include/generated/uapi/linux/version.h
> > SUCCESS
> > ...
> > make O=/home/sat/ktest/output -j8 ... GEN /home/sat/ktest/output/Makefile
> > ...
> > Using /home/sat/src/test-linux-stable/linux-stable as source for kernel
> > /home/sat/src/test-linux-stable/linux-stable is not clean, please run 'make mrproper'
> > in the '/home/sat/src/test-linux-stable/linux-stable' directory.
> > make[1]: *** [prepare3] Error 1
> > make[1]: *** Waiting for unfinished jobs....
> > HOSTLD arch/x86/tools/relocs
> > make[1]: *** wait: No child processes. Stop.
> > make: *** [sub-make] Error 2
> > FAILED!
> > CRITICAL FAILURE... failed build
> > ===============================================================================
> >
> > To avoid this problem, it's necessary to run make mrproper not only
> > for OUTPUT_DIR, but also for BUILD_DIR.
> >
> > Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> >
> > ---
> > tools/testing/ktest/ktest.pl | 16 +++++++++-------
> > 1 file changed, 9 insertions(+), 7 deletions(-)
> >
> > diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
> > index f731ef6..1169b2a 100755
> > --- a/tools/testing/ktest/ktest.pl
> > +++ b/tools/testing/ktest/ktest.pl
> > @@ -120,6 +120,7 @@ my $syslinux;
> > my $syslinux_path;
> > my $syslinux_label;
> > my $target;
> > +my $makecmd;
> > my $make;
> > my $pre_install;
> > my $post_install;
> > @@ -2198,6 +2199,11 @@ sub load_force_config {
> > close IN;
> > }
> >
> > +sub mrproper {
> > + run_command "$makecmd mrproper" or dodie "make mrproper for $builddir";
> > + run_command "$make mrproper" or dodie "make mrproper for $outputdir";
> > +}
> > +
> > sub build {
> > my ($type) = @_;
> >
> > @@ -2235,17 +2241,13 @@ sub build {
> > if (!$noclean) {
> > run_command "mv $output_config $outputdir/config_temp" or
> > dodie "moving .config";
> > -
> > - run_command "$make mrproper" or dodie "make mrproper";
> > -
> > + mrproper;
> > run_command "mv $outputdir/config_temp $output_config" or
> > dodie "moving config_temp";
> > }
> > -
> > } elsif (!$noclean) {
> > unlink "$output_config";
> > - run_command "$make mrproper" or
> > - dodie "make mrproper";
> > + mrproper;
> > }
> >
> > # add something to distinguish this build
> > @@ -3996,7 +3998,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) {
> >
> > undef %force_config;
> >
> > - my $makecmd = set_test_option("MAKE_CMD", $i);
> > + $makecmd = set_test_option("MAKE_CMD", $i);
> >
> > $outputdir = set_test_option("OUTPUT_DIR", $i);
> > $builddir = set_test_option("BUILD_DIR", $i);
>
next prev parent reply other threads:[~2014-03-02 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-02 12:20 [PATCH 1/2] ktest: add 2nd parameter of run_command() to set the redirect target file Satoru Takeuchi
2014-03-02 12:23 ` [PATCH 2/2] ktest: run make mrproper not only for OUTPUT_DIR but also for BUILD_DIR to avoid build failure Satoru Takeuchi
2014-03-02 13:29 ` Steven Rostedt
2014-03-02 14:17 ` Satoru Takeuchi [this message]
2014-03-02 14:24 ` Steven Rostedt
2014-03-08 0:12 ` [PATCH 1/2] ktest: add 2nd parameter of run_command() to set the redirect target file Satoru Takeuchi
2014-03-08 0:43 ` Steven Rostedt
2014-03-08 8:34 ` Satoru Takeuchi
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=87sir0ofax.wl%satoru.takeuchi@gmail.com \
--to=satoru.takeuchi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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 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).