Received: by 10.213.65.68 with SMTP id h4csp1655954imn; Mon, 26 Mar 2018 11:50:10 -0700 (PDT) X-Google-Smtp-Source: AG47ELtM6egf3SDYJcwWMmGS1qg3DvA83Fj519bQsCibjLRCZAxNMtNEl5n8A90ClZxkWKc8o5gE X-Received: by 2002:a17:902:7586:: with SMTP id j6-v6mr27745717pll.352.1522090210448; Mon, 26 Mar 2018 11:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522090210; cv=none; d=google.com; s=arc-20160816; b=v4ZSnUry9onv6R97f0jihgV9A0YRgogMa0PEy+gynLxz+eoiWpPMIUTKuXTvwgkDFD tzyvpyqigRl+zMpI4e4SKXUHmImmJ04S9hkGc/WcQAJuV3edVSWfniw2hVv7Guu2BzuV vspeqN+dzlsKzPwguarbEWQeclgeOSlHcDGL2GGfREBrH2jJgJjZQQcu/UQIcINL8EG4 qdCTE40qSMFX4D+slUyJgcqziN4oK7Hzth4eCcUX2ODK0Q8qB6RK2wuSBu/rS3R5U80u pMm0oBG0b93vpyILO32ZOzW5kMb6GkZQMZAiknhoRaWwyOzx4txPx81xgk/kzVkYf0y9 8C5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=yeqWRZqSn9+q645Ke9UABcVVzPY3fzmAyAGuS+CZ6ls=; b=zsAErt2f4tpP90ktbGm+bZCMcl6/hZOWlS52E/Kbf5LUZy9hnJUTZbxq4ca5HGvcAU AaMT89IykXxX4EjY3ppUfSS2mocG/My5nZRWdA5CtboiYqgLeh9vRgeJJSv1Nau9deeC bK+EW1gr9Cnk0b9G9MEpaHpTL3xLz4KreMU5noSHoFJMVtE31SIOruPCkS8dKb/V820C GF0VVot98C9NKtTc7d397JYKSla5ZQvPzrbljQ3ZWhEbXU4nxeYkmJrsfNVz24EGRwsV VgZ4ub1Hq2oo7XSDZ7EoK1R0pp5kvBqxrbkTH5Ua+8yGtkGiXYdRdbkuBU+Eo0RBEC+k Mx+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=n9lLl/JJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si6969789pgg.68.2018.03.26.11.49.55; Mon, 26 Mar 2018 11:50:10 -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=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=n9lLl/JJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbeCZSsw (ORCPT + 99 others); Mon, 26 Mar 2018 14:48:52 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:42050 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752626AbeCZSsu (ORCPT ); Mon, 26 Mar 2018 14:48:50 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2QIm8hT119406; Mon, 26 Mar 2018 18:48:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=yeqWRZqSn9+q645Ke9UABcVVzPY3fzmAyAGuS+CZ6ls=; b=n9lLl/JJxMvxtKLY09LGGPExh5yiRVtgRrk4Czgjoaid8Ul0h2/g64snnweS0kaUJJxx J1ltIDSbGp4ruPFEzI1nnUJIWaSujOfyVeKxMqLbSvHVXjC/2jZU1pUX/4GkbrhmtVBL o7C4mkzlPypynw/R/mFFsZvTFl7GUAAE2L/z4G58ctnW9klJ4idmvszWZ6n5TjjZ2QTv Fhd8yGF7BwhD8FIQ2lF5zj52+v3XXS8hVqqwDR8OWFfpWKYeXAsHMO5GJxheevhVgLkH lddvW5XfEJ1LKiT9WrjPbhcj//JGCnO5TzGjhBeAALNiUo8NXXPNQ9dPdFsSe1/YeBfS ZA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2gy6f6r045-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Mar 2018 18:48:48 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2QImlOC006302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Mar 2018 18:48:47 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2QImk8E010479; Mon, 26 Mar 2018 18:48:47 GMT Received: from [10.211.54.111] (/10.211.54.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 26 Mar 2018 11:48:46 -0700 Subject: Re: [PATCH 2/3] Ktest: use dodie for critical falures To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, dhaval.giani@oracle.com References: <1513380011-15274-1-git-send-email-tianyang.chen@oracle.com> <1513380011-15274-3-git-send-email-tianyang.chen@oracle.com> <20180321111608.31c712a2@gandalf.local.home> From: Tim Tianyang Chen Organization: Oracle Corporation Message-ID: Date: Mon, 26 Mar 2018 11:48:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180321111608.31c712a2@gandalf.local.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8844 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=490 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803260185 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the review Steve! One quick comment inline: On 03/21/2018 08:16 AM, Steven Rostedt wrote: > On Fri, 15 Dec 2017 15:20:10 -0800 > Tim Tianyang Chen wrote: > >> Users should get emails when the script dies because of a critical failure. Critical >> failures are defined as any errors that could abnormally terminate the script. >> >> In order to add email support, this patch converts all die() to dodie() except: >> * when '-v' is used as an option to get the version of the script. >> * in Sig-Int handeler because it's not a fatal error to cancel the script. >> * errors happen during parsing config > I would say you don't need it for parsing the config either. It doesn't > make sense, as you wouldn't have the mailto defined yet. > Maybe it's the way I worded it. This patch coverts all die() to dodie() _except_ these situations. So it doesn't send emails on config errors, which is what you said here. >> @@ -4132,7 +4132,7 @@ if ($#ARGV == 0) { >> if (! -f $ktest_config) { >> $newconfig = 1; >> get_test_case; >> - open(OUT, ">$ktest_config") or die "Can not create $ktest_config"; >> + open(OUT, ">$ktest_config") or dodie "Can not create $ktest_config"; > Here, no config was specified, and so no configs either. > > >> print OUT << "EOF" >> # Generated by ktest.pl >> # >> @@ -4167,7 +4167,7 @@ if (defined($opt{"LOG_FILE"})) { >> my @new_configs = keys %entered_configs; >> if ($#new_configs >= 0) { >> print "\nAppending entered in configs to $ktest_config\n"; >> - open(OUT, ">>$ktest_config") or die "Can not append to $ktest_config"; >> + open(OUT, ">>$ktest_config") or dodie "Can not append to $ktest_config"; > Here too. Right, I missed these two. I will send out v3 shortly. Tim