From: Ralph Boehme Date: Thu, 12 Oct 2017 15:07:15 +0000 (+0200) Subject: selftest: add some debugging to test_give_owner.sh X-Git-Tag: tevent-0.9.34~220 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=156015aed0b5a72b2f7150beb5cdaffa32b554e5;p=thirdparty%2Fsamba.git selftest: add some debugging to test_give_owner.sh Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Oct 13 01:22:05 CEST 2017 on sn-devel-144 --- diff --git a/source3/script/tests/test_give_owner.sh b/source3/script/tests/test_give_owner.sh index 64e09f3c2b4..c8f437ebd8b 100755 --- a/source3/script/tests/test_give_owner.sh +++ b/source3/script/tests/test_give_owner.sh @@ -76,14 +76,34 @@ add_ace() { # avoid duplicate out=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD) + if [ $? -ne 0 ] ; then + echo "get acl failed" + echo "$out" + return 1 + fi + echo "Original ACL" + echo $out echo "$out" | grep "$local_ace" && return 0 # add it - $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "$ace" || return 1 + $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "$ace" + if [ $? -ne 0 ] ; then + echo "add acl failed" + return 1 + fi # check it's there - out=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD) || return 1 + out=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD) + if [ $? -ne 0 ] ; then + echo "get new acl failed" + echo "$out" + return 1 + fi + echo "New ACL" + echo $out + echo "Checking if new ACL has \"$local_ace\"" echo "$out" | grep "$local_ace" || return 1 + echo "ok" } chown_give_fails() {