From patchwork Wed Oct 11 11:46:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 824360 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CffrTmf+"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yBsfS6H99z9sNr for ; Wed, 11 Oct 2017 22:47:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=NwuYuwgHhDzECC3368m1Lg4UxC6GSAgiZjvFBst325Q=; b=Cff rTmf+TmuQC9QHou9ck4DoQnbxt+E5rpbnbtKE6bp52HaQjxh+XzriT2R6G2q8PLvmQ03BrhXajJYE MLawpqkcubSrqx19f5PjDePf0TFKliNp7/nRQ4nQjF/Nhijr06odLSk7ZpS/P9RPwF0Fz6/CG9cBN yxEfuZ2bvcdw2dg8tAMYrAhV7TWIYZhuWQZpL6gcjyFt3IOSq6efROLvCUooEds+9hx/Vi/o9agx1 1Z4AYfdQiIbyOuG3BOeCq+kXPv8mb9xyz2YL3TCBJtV7XNSZMAMF9jcH7XSmi86I7wjQqOaKV5I7+ UCh8tkC52YlWukJgWFKzBKmXI9fsr2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e2FTj-00053c-9H; Wed, 11 Oct 2017 11:47:11 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:72ef::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e2FTF-0004zq-1r for hostap@lists.infradead.org; Wed, 11 Oct 2017 11:46:42 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1e2FSt-00014H-Dc; Wed, 11 Oct 2017 13:46:19 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH] hwsim tests: add script to aid bisecting Date: Wed, 11 Oct 2017 13:46:17 +0200 Message-Id: <20171011114617.27448-1-johannes@sipsolutions.net> X-Mailer: git-send-email 2.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171011_044641_286293_A9F75559 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg I find myself writing a version of this script every now and then, but there's little point in that - just add one to the tree so we can use it again. Signed-off-by: Johannes Berg --- tests/hwsim/vm/bisect-run.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 tests/hwsim/vm/bisect-run.sh diff --git a/tests/hwsim/vm/bisect-run.sh b/tests/hwsim/vm/bisect-run.sh new file mode 100755 index 000000000000..fa511073f0db --- /dev/null +++ b/tests/hwsim/vm/bisect-run.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +set -e + +path="$(dirname $0)" + +test="$1" +makedir="$2" +if [ -z $test ] ; then + echo "This script helps bisect test failures, given a test case." + echo "" + echo "Use it like this:" + echo " git bisect start" + echo " git bisect bad " + echo " git bisect good " + echo " git bisect run $0 []" + echo "" + echo "(the compile directory is optional, use it if you want to" + echo "use an out-of-tree kernel build." + echo "" + echo "Note that, of course, you have to have a working vm-run setup." + exit 200 # exit git bisect run if called that way +fi + +if [ -n "$makedir" ] ; then + cd "$makedir" +fi + +yes '' | make oldconfig || exit 125 +make -j8 || exit 125 + +output=$(mktemp) +if [ $? -ne 0 ] ; then + exit 202 +fi +finish() { + rm -f $output +} +trap finish EXIT + +"$path/vm-run.sh" $test 2>&1 | tee $output + +grep -q 'ALL-PASSED' $output && exit 0 || exit 1