Thread (5 messages) 5 messages, 5 authors, 2021-08-10

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

From: David Sterba <hidden>
Date: 2021-08-10 14:07:26
Also in: fstests

On Fri, Aug 06, 2021 at 02:42:36PM +0300, Nikolay Borisov wrote:
quoted
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help