lkml.org 
[lkml]   [2017]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2][RFC]Ktest: Use dodie for critial failures
From
Date


On 12/14/2017 04:03 PM, Steven Rostedt wrote:
> On Tue, 21 Nov 2017 10:53:35 -0800
> Tim Tianyang Chen <tianyang.chen@oracle.com> 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

\
 
 \ /
  Last update: 2017-12-15 01:19    [W:0.046 / U:2.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site