Re: [PATCH v3 02/29] selftests/resctrl: Return -1 instead of errno on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ilpo,

On 12/11/2023 4:17 AM, Ilpo Järvinen wrote:
> A number of functions in the resctrl selftests return errno. It is
> problematic because errno is positive which is often counterintuitive.
> Also, every sites returning errno prints the error message already with

every sites -> every site

> ksft_perror() so there is not much added value in returning the precise
> error code.
> 
> Simply convert all places returning errno to return -1 that is typical
> userspace error code in case of failures.
> 
> While at it, improve resctrl_val() comment to state that 0 means the
> test was run (either pass or fail).
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> ---

Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Reinette




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux