From: Martin Schwenke Date: Sat, 28 Feb 2026 00:49:09 +0000 (+1100) Subject: ctdb-tests: Add error handling to stat stub X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=507c1f8abbc3ff75bf280aa2b12088418c343bae;p=thirdparty%2Fsamba.git ctdb-tests: Add error handling to stat stub Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/UNIT/eventscripts/stubs/stat b/ctdb/tests/UNIT/eventscripts/stubs/stat index e8bd081aff5..bc854cf60a5 100755 --- a/ctdb/tests/UNIT/eventscripts/stubs/stat +++ b/ctdb/tests/UNIT/eventscripts/stubs/stat @@ -39,8 +39,12 @@ fake_inode() } if [ -n "$format" ]; then + rc=0 for f; do if [ ! -e "$f" ]; then + echo "stat: cannot statx '${f}': " \ + "No such file or directory" + rc=1 continue fi case "$f" in @@ -61,7 +65,7 @@ if [ -n "$format" ]; then esac done - exit + exit $rc fi usage