Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp174624imm; Tue, 3 Jul 2018 16:28:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLVuFuZCzCMIq3FOoIhDIlSNStQ0Kwwf3VJbcEKZmN2Bi9JrLZgf1i5S53wW95EYuom8w/H X-Received: by 2002:a63:ab4c:: with SMTP id k12-v6mr26967667pgp.386.1530660528352; Tue, 03 Jul 2018 16:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530660528; cv=none; d=google.com; s=arc-20160816; b=OlUaoHLoXe6OzQwZXKeYogVhJvxcIRdDshgokffwHSxn8ouE/aIEYPUjULA32BQ7bO 5m+spgMdgF3ASxGbehPGwm03jnjLJxOTEIQRHbNFYkqYWenqaJ03bbx4SXOABpw2CAri u93OPBl0caRl74PdWOJ38XrQ2YYLuplWLld+vZy8FOHvTaLwJTmwKmtbB0tmCMShZJIy 8DUQQvSZ/Wub48xPaRqTwjTf8J3bGi+rmHZqzJIqSSCI0Bzl49QbshcsJWTtQTrL3wXf 2KquSs6AxR60i/8OhB04EvQEL04BaaUuskRFeBn+/5OveV1oLj0mGQ2QGv6S6jLrNzFD bUyA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=oy4vdV+YyGDp8N8JejNSgfuzbZnkME9IlLzh2YFEx5U=; b=uR5Of5W1gFpEnkR0vD9VLiZV1qTfu71dA37hHP7Ifq629mlzKrVfOlTEQ9mk3ZcZvA dOaaupAZi0emKJ2C24meK4JoXO/vaQFDvQonJQhdZHk8mXBChemvyasi4oMWAUXv+693 5yY1HRWASz8NQIFvY+fS35U+onTxmec3HD2SWm0BLYuQ5755xix6vZKBEYaz1q4I1sSi 8TsI7DKh+wfCiu7z6fIR6OlUrn3yfbkxZ1x3ag1tqVA45na2fd4LoBKgLdrMRcR9vTk5 PY25h/hH04vUSVoNPaAUO+9HaCQIpghtatvkULKwzD0zpHYlYnaG847dXHLBHTNQFZjU jukw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=b6KgBlSU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t22-v6si2032042plo.263.2018.07.03.16.28.32; Tue, 03 Jul 2018 16:28:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=b6KgBlSU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251AbeGCX1J (ORCPT + 99 others); Tue, 3 Jul 2018 19:27:09 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35866 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750764AbeGCX1I (ORCPT ); Tue, 3 Jul 2018 19:27:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oy4vdV+YyGDp8N8JejNSgfuzbZnkME9IlLzh2YFEx5U=; b=b6KgBlSU9XmMQ/7eqRHwAGkUn 9ydqrpvOVrC9Crx1qDPccNc17aBXsjp05bT9vHQsa/Z5HjpANwJGog62y+8w80izimDxDw2SLJCjK 2PEw095CHj56HEUv3l8LhElOQy5aOGuouF0hbBTHBWkO1W3skrfdX0CDg4AdfDfI/1EzowUMg+OVs q7hN2xnRH+ne4RyMjj+HWR7yMJB2mSEgEH63/Ev1IEqz3euWlM1LXiEOtzXmrYCes4kkrSDO8VjBF Lxo2AApybBgn2zpnSCHAc1XvFIxyRXPcKMWtCDpqdto1A0C+/s7wJoGlOssyC032OowAEVIAZTwJQ sWZLlrovQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1faUhP-0007dT-9X; Tue, 03 Jul 2018 23:27:07 +0000 Subject: Re: [build-check] scripts: add check_build script To: Andrew Morton , Norbert Manthey Cc: Linus Torvalds , David Woodhouse , linux-kernel@vger.kernel.org References: <1530186789-28808-1-git-send-email-nmanthey@amazon.de> <1530623539-650-1-git-send-email-nmanthey@amazon.de> <20180703154914.5d3e8f28e1d87e48180073e3@linux-foundation.org> From: Randy Dunlap Message-ID: <01151c44-c3f7-c344-8e58-2e6b348960fb@infradead.org> Date: Tue, 3 Jul 2018 16:27:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180703154914.5d3e8f28e1d87e48180073e3@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/03/2018 03:49 PM, Andrew Morton wrote: > On Tue, 3 Jul 2018 15:12:10 +0200 Norbert Manthey wrote: > >> This script performs build testing, by building several configurations >> several times. The script is introduced to improve the consistency of >> testing changes in the kernel configuration. >> >> This version build randconfig 10 times, as well as allyesconfig, >> allnoconfig and allmodconfig. Depending on the used machine and system >> setup, the script might take a while to finish. >> >> The script logs all the used config files, as well as the output of the >> build commands to a log directory "build_check_logs", so that this data >> can be retrieved after running the script. > > I'm unable to even guess how many people will find this useful. I expect that lots of us have similar scripts. >> +build () >> +{ >> + local -r LOG_FILE="$1" >> + local -i STATUS=0 >> + >> + make clean -j $(nproc) &> /dev/null >> + make -j $(nproc) &>> "$LOG_FILE" || STATUS=$? >> + >> + echo "build status: $STATUS" >> "$LOG_FILE" >> + echo "[$SECONDS] build status: $STATUS" >> + return "$STATUS" >> +} > > The script never sets nproc. So I guess this is a bare `make -j'. > When I type that on my (quite beefy) workstation I get eleventy xillion > processes and the machine locks up. Can't even wiggle the mouse. > After a 20 minute nap (thanks!) it was still comatose so I hit the big > button (who writes this junk??). > > So you might want to take an educated guess from /proc/cpuinfo here. or use nproc=`getconf _NPROCESSORS_ONLN` or double it if you want to keep processes ready/waiting. -- ~Randy