mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
python/samba/tests/blackbox: Fix undetected deltree fail
With msdfs root share smbclient deltree command can fail without setting the errorcode (e.g. when do_list encounters an error it will log a warning message and continue rather than error out fatally) Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
b02f1d676f
commit
05de29a4d0
@ -45,7 +45,9 @@ class SmbCaclsBlockboxTestBase(BlackboxTestCase):
|
||||
# so if we fail with remote remove perform local remove
|
||||
# (of remote files) instead
|
||||
smbclient_args = self.build_test_cmd("smbclient", ["//%s/%s" % (self.server, self.share), "-c", "deltree %s/*" % self.testdir])
|
||||
self.check_output(smbclient_args)
|
||||
out = self.check_output(smbclient_args)
|
||||
if "NT_STATUS_OBJECT_PATH_NOT_FOUND" in out.decode():
|
||||
raise Exception("deltree: failed without setting errcode")
|
||||
except Exception as e:
|
||||
print("remote remove failed: %s" % str(e))
|
||||
dirpath = os.path.join(os.environ["LOCAL_PATH"],self.testdir)
|
||||
|
Loading…
Reference in New Issue
Block a user