Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754545AbdLOASs (ORCPT ); Thu, 14 Dec 2017 19:18:48 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:42136 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754424AbdLOASp (ORCPT ); Thu, 14 Dec 2017 19:18:45 -0500 Subject: Re: [PATCH 2/2][RFC]Ktest: Use dodie for critial failures To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, dhaval.giani@oracle.com References: <20171120173738.34823-3-tianyang.chen@oracle.com> <20171214190322.29d857ba@gandalf.local.home> From: Tim Tianyang Chen Organization: Oracle Corporation Message-ID: <9d01f0b6-9dc8-5c7a-df16-2ff089baa651@oracle.com> Date: Thu, 14 Dec 2017 16:11:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171214190322.29d857ba@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=8745 signatures=668648 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712150002 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1074 Lines: 24 On 12/14/2017 04:03 PM, Steven Rostedt wrote: > On Tue, 21 Nov 2017 10:53:35 -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 terminate the script, via die(). >> >> 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. >> * the die() in dodie() itself actually kills the script. > You basically converted all the "die" in the reading of the config file > into "dodie" so that you could email. But since the reading of the > config failed, there's no way to do the email, because that gets set by > the config. > > Perhaps some can be converted, but most of these I would say, no. Right, it shouldn't send emails when it fails to even parse the config. Since the script will yell immediately there is no need to email either. Thanks, Tim