From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753262AbaCBMXl (ORCPT ); Sun, 2 Mar 2014 07:23:41 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:62410 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035AbaCBMXk (ORCPT ); Sun, 2 Mar 2014 07:23:40 -0500 Date: Sun, 02 Mar 2014 21:23:36 +0900 Message-ID: <87txbgokl3.wl%satoru.takeuchi@gmail.com> From: Satoru Takeuchi To: LKML Cc: Steven Rostedt Subject: [PATCH 2/2] ktest: run make mrproper not only for OUTPUT_DIR but also for BUILD_DIR to avoid build failure In-Reply-To: <87vbvwokq8.wl%satoru.takeuchi@gmail.com> References: <87vbvwokq8.wl%satoru.takeuchi@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/23.4 Mule/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Satoru Takeuchi Build failure hapens with the following log if BUILD_DIR is dirty. =============================================================================== ... 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 Cc: Steven Rostedt --- 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); -- 1.8.5.3