Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2658344pxa; Mon, 17 Aug 2020 15:45:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8FUUkZ4qi7erq6WtjxyZ8+RiXAXb+ee9Wj5EpWDmCx1mhlvWFp0zu9apA6BD1L9TfV6rL X-Received: by 2002:a05:6402:2037:: with SMTP id ay23mr16727356edb.48.1597704311444; Mon, 17 Aug 2020 15:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704311; cv=none; d=google.com; s=arc-20160816; b=iHXOGz/0CyhtxVZ23KtynaK4FRwEI6wMlhqnYw/vjhfI/FK65dB/w6HODnSPz1BqIM zdGERO/+zn46w2SIi76H8piNKsQBfC5xVPUvMPqqatm/ptJgOqeQ7XwUlxeupp52V9+/ rXNMZ4wjy1HwpJNZdTo7EJtoU1U2Cu/SrOqarKRj/dJXy8c7Noh73XYjPnmcqF8cUL/G FlC90fih/8vPfASBp79TXVGZ7ajKQxAGm/Q5tNMQnROsZxla7ztdefIC591Mvyd5xdWA 1hjK/HVL800PJ43wSijD8Vz7j7IR1WwsadqbmwYuGnRq2s9CEzR7X6x2s0B62uZ4AqUM Aa6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=in/5Q2pdjSHzilIRT95QALEk5IrikuudTtQbKubNSoY=; b=U6JyfxVT54w//SWkJPJ1ssdaVPM6FK/HuF26RucFtUCutJziLU3DlTWq+bK1e8LJrq 8AU1bpY35WaFX6rz+t6X4nwVz/JXD/FTrHXanNn8Pn02jcY31W5p0IsDeZP/CC7cM++X 7YtdMtB3E+ZwCHBcKR3qLfBo+xWw4Oia44dZdrV3RN/crX+Zj2L9kQgMjeSUmiQvIb2G AIqMFwwJMaETxGMROMR8JLyYmsg+PWqisSFCRhYgNtQNnYRiXETBth5FUfqseFTQlitc z3JCj2uAgKc5irMsSF7RSC0M8kK4HaXOYty0odhVAx7X7vOKPeYyXQimfFIXl/9EI7c2 EhSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b2N6v7dh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si11975953edv.323.2020.08.17.15.44.48; Mon, 17 Aug 2020 15:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b2N6v7dh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387623AbgHQTL3 (ORCPT + 99 others); Mon, 17 Aug 2020 15:11:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:50696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730720AbgHQPlP (ORCPT ); Mon, 17 Aug 2020 11:41:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E783020760; Mon, 17 Aug 2020 15:41:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678874; bh=lKORXuK1Vq7++6LFUb5ugaddd/IrZZClPHqLCVvqZtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b2N6v7dhDy2GTkMSz6BoFWthDzdft1Ld9hOVnxPHRsyIOrbm+0b4L1/Dbe+51CGfL trMaWCkOGb2oZjb+Gk9Zabetx7Wk93VcnsiqmrOS/ugywXUt6G5bj/iuVUwRTKLswX izO1zep/0ST+aR01t+tJkbXYgF3575fbmrllXSRM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Chen , Brendan Higgins , Shuah Khan , Sasha Levin Subject: [PATCH 5.7 002/393] kunit: capture stderr on all make subprocess calls Date: Mon, 17 Aug 2020 17:10:52 +0200 Message-Id: <20200817143819.708468992@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Chen [ Upstream commit 5a9fcad71caa970f30aef99134a1cd19bc4b8eea ] Direct stderr to subprocess.STDOUT so error messages get included in the subprocess.CalledProcessError exceptions output field. This results in more meaningful error messages for the user. This is already being done in the make_allyesconfig method. Do the same for make_mrproper, make_olddefconfig, and make methods. With this, failures on unclean trees [1] will give users an error message that includes: "The source tree is not clean, please run 'make ARCH=um mrproper'" [1] https://bugzilla.kernel.org/show_bug.cgi?id=205219 Signed-off-by: Will Chen Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/testing/kunit/kunit_kernel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py index 63dbda2d029f6..e20e2056cb380 100644 --- a/tools/testing/kunit/kunit_kernel.py +++ b/tools/testing/kunit/kunit_kernel.py @@ -34,7 +34,7 @@ class LinuxSourceTreeOperations(object): def make_mrproper(self): try: - subprocess.check_output(['make', 'mrproper']) + subprocess.check_output(['make', 'mrproper'], stderr=subprocess.STDOUT) except OSError as e: raise ConfigError('Could not call make command: ' + e) except subprocess.CalledProcessError as e: @@ -47,7 +47,7 @@ class LinuxSourceTreeOperations(object): if build_dir: command += ['O=' + build_dir] try: - subprocess.check_output(command, stderr=subprocess.PIPE) + subprocess.check_output(command, stderr=subprocess.STDOUT) except OSError as e: raise ConfigError('Could not call make command: ' + e) except subprocess.CalledProcessError as e: @@ -77,7 +77,7 @@ class LinuxSourceTreeOperations(object): if build_dir: command += ['O=' + build_dir] try: - subprocess.check_output(command) + subprocess.check_output(command, stderr=subprocess.STDOUT) except OSError as e: raise BuildError('Could not call execute make: ' + e) except subprocess.CalledProcessError as e: -- 2.25.1