Re: [PATCH V1]Perf: Return error code for perf_session__new function on failure

From: Mamatha Inamdar
Date: Thu Aug 22 2019 - 09:45:32 EST



On 21/08/19 1:07 AM, Mukesh Ojha wrote:

On 8/20/2019 4:51 PM, Mamatha Inamdar wrote:
This Patch is to return error code of perf_new_session function
on failure instead of NULL
----------------------------------------------
Test Results:

Before Fix:

$ perf c2c report -input
failed to open nput: No such file or directory

$ echo $?
0
------------------------------------------
After Fix:

$ ./perf c2c report -input
failed to open nput: No such file or directory

$ echo $?
254

Signed-off-by: Mamatha Inamdar <mamatha4@xxxxxxxxxxxxxxxxxx>
Acked-by: Ravi Bangoria <ravi.bangoria@xxxxxxxxxxxxx>
Reported-by: Nageswara R Sastry <rnsastry@xxxxxxxxxxxxxxxxxx>
Tested-by: Nageswara R Sastry <rnsastry@xxxxxxxxxxxxxxxxxx>

Looks good to me.

Reviewed-by: Mukesh Ojha <mojha@xxxxxxxxxxxxxx>

Thanks,
Mukesh

Mukesh,

Thanks for reviewing the patch..