Re: [PATCH v2] fstests: btrfs/244: add test case to verify the behavior of deleting non-existing device

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



On Fri, Aug 06, 2021 at 02:42:36PM +0300, Nikolay Borisov wrote:
> > +if [ $ret -ne 1 ]; then
> > +	echo "Unexpected return value from btrfs command, has $ret expected 1"
> > +fi
> 
> <rant>
> This just shows how broken progs are w.r.t return values. The generally
> accepted return value is 0 on success, yet it returns 1 on success since
> the functions implementing this functionality in progs treat the return
> value as a boolean.
> </rant>

Heh, not following the common convention of 0 for success, !0 for errors
would be crazy and hardly left unnoticed by users.



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux