1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

python:tests: Remove semicolons

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-08-17 11:09:31 +12:00 committed by Andrew Bartlett
parent 7efe6b0ab4
commit af61444d7a
7 changed files with 28 additions and 28 deletions

View File

@ -334,7 +334,7 @@ class InheritanceSmbCaclsTests(SmbCaclsBlockboxTestBase):
self.assertTrue(self.file_ace_check(self.f1, child_file_ace) == False)
# nested dir 'oi_dir/nested/' should have CI|I|READ
child_dir_ace = self.ace_parse_str(dir_inherited_ace_str);
child_dir_ace = self.ace_parse_str(dir_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.nested_dir, child_dir_ace))
# nested file 'oi_dir/nested/file-2' should NOT have inherited I/READ
@ -342,7 +342,7 @@ class InheritanceSmbCaclsTests(SmbCaclsBlockboxTestBase):
self.assertTrue(self.file_ace_check(self.f2, child_file_ace) == False)
# nested dir 'oi_dir/nested/nested_again' should have CI|I|READ
child_dir_ace = self.ace_parse_str(dir_inherited_ace_str);
child_dir_ace = self.ace_parse_str(dir_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.nested_again_dir, child_dir_ace))
# nested file 'oi_dir/nested/nested_again/file-3' should NOT have inherited I/READ
@ -410,7 +410,7 @@ class InheritanceSmbCaclsTests(SmbCaclsBlockboxTestBase):
dir_ace = self.ace_parse_str(dir_acl_str)
self.assertTrue(self.file_ace_check(self.oi_dir, dir_ace) == False)
child_file_ace = self.ace_parse_str(file_inherited_ace_str);
child_file_ace = self.ace_parse_str(file_inherited_ace_str)
# nested file 'oi_dir/file-1' should NOT have inherited I/READ
self.assertTrue(self.file_ace_check(self.f1, child_file_ace) == False)
@ -481,7 +481,7 @@ class InheritanceSmbCaclsTests(SmbCaclsBlockboxTestBase):
dir_mod_acl_str, self.oi_dir])
# check top level container 'oi_dir' has CI/CHANGE
dir_ace = self.ace_parse_str(dir_mod_acl_str);
dir_ace = self.ace_parse_str(dir_mod_acl_str)
self.assertTrue(self.file_ace_check(self.oi_dir, dir_ace))
# nested file 'oi_dir/file-1' should NOT have inherited I/CHANGE
@ -553,23 +553,23 @@ class InheritanceSmbCaclsTests(SmbCaclsBlockboxTestBase):
self.assertTrue(self.file_ace_check(self.oi_dir, dir_ace))
# nested file 'oi_dir/file-1' should have inherited I/READ
child_file_ace = self.ace_parse_str(file_inherited_ace_str);
child_file_ace = self.ace_parse_str(file_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.f1, child_file_ace))
# nested dir 'oi_dir/nested/' should have OI|CI|I|READ
child_dir_ace = self.ace_parse_str(dir_inherited_ace_str);
child_dir_ace = self.ace_parse_str(dir_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.nested_dir, child_dir_ace))
# nested file 'oi_dir/nested/file-2' should have inherited I/READ
child_file_ace = self.ace_parse_str(file_inherited_ace_str);
child_file_ace = self.ace_parse_str(file_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.f2, child_file_ace))
# nested dir 'oi_dir/nested/nested_again' should have OI|CI|I|READ
child_dir_ace = self.ace_parse_str(dir_inherited_ace_str);
child_dir_ace = self.ace_parse_str(dir_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.nested_again_dir, child_dir_ace))
# nested file 'oi_dir/nested/nested_again/file-3' should have inherited I/READ
child_file_ace = self.ace_parse_str(file_inherited_ace_str);
child_file_ace = self.ace_parse_str(file_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.f3, child_file_ace))
except BlackboxProcessError as e:
@ -720,24 +720,24 @@ class InheritanceSmbCaclsTests(SmbCaclsBlockboxTestBase):
self.assertTrue(self.file_ace_check(self.oi_dir, dir_ace))
# nested file 'oi_dir/file-1' should have inherited I|CHANGE
child_file_ace = self.ace_parse_str(file_mod_inherited_ace_str);
self.assertTrue(self.file_ace_check(self.f1, child_file_ace));
child_file_ace = self.ace_parse_str(file_mod_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.f1, child_file_ace))
# nested dir 'oi_dir/nested/' should have OI|CI|I|CHANGE
child_dir_ace = self.ace_parse_str(dir_mod_inherited_ace_str)
self.file_ace_check(self.nested_dir, child_dir_ace)
# nested file 'oi_dir/nested/file-2' should have inherited I|CHANGE
child_file_ace = self.ace_parse_str(file_mod_inherited_ace_str);
self.assertTrue(self.file_ace_check(self.f2, child_file_ace));
child_file_ace = self.ace_parse_str(file_mod_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.f2, child_file_ace))
# nested dir 'oi_dir/nested/nested_again' should have OI|CI|I|CHANGE
child_dir_ace = self.ace_parse_str(dir_mod_inherited_ace_str)
self.file_ace_check(self.nested_again_dir, child_dir_ace)
# nested file 'oi_dir/nested/nested_again/file-3' should have inherited I|CHANGE
child_file_ace = self.ace_parse_str(file_mod_inherited_ace_str);
self.assertTrue(self.file_ace_check(self.f3, child_file_ace));
child_file_ace = self.ace_parse_str(file_mod_inherited_ace_str)
self.assertTrue(self.file_ace_check(self.f3, child_file_ace))
except BlackboxProcessError as e:
self.fail(str(e))

View File

@ -22,7 +22,7 @@ import os
class LdapWhoami(tests.TestCase):
def test_ldap_whoami(self):
lp = s3param.get_context()
lp.load(os.getenv("SERVERCONFFILE"));
lp.load(os.getenv("SERVERCONFFILE"))
domain=os.getenv("DOMAIN")
username=os.getenv("DC_USERNAME")

View File

@ -119,7 +119,7 @@ class ReparsePoints(samba.tests.libsmb.LibsmbTests):
CreateDisposition=libsmb.FILE_CREATE)
b = reparse_symlink.put(0x80000025, 0, b'asdfasdfasdfasdfasdfasdf')
conn.fsctl(fd, libsmb.FSCTL_SET_REPARSE_POINT, b, 0)
conn.close(fd);
conn.close(fd)
fd,cr,_ = conn.create_ex(
filename,
@ -133,7 +133,7 @@ class ReparsePoints(samba.tests.libsmb.LibsmbTests):
conn.write(fd, b'x', 1)
conn.delete_on_close(fd, 1)
conn.close(fd);
conn.close(fd)
# Show that directories can carry reparse points
@ -164,7 +164,7 @@ class ReparsePoints(samba.tests.libsmb.LibsmbTests):
ntstatus.NT_STATUS_IO_REPARSE_TAG_NOT_HANDLED)
conn.delete_on_close(dir_fd, 1)
conn.close(dir_fd);
conn.close(dir_fd)
# Only empty directories can carry reparse points
@ -215,7 +215,7 @@ class ReparsePoints(samba.tests.libsmb.LibsmbTests):
CreateDisposition=libsmb.FILE_CREATE)
b = reparse_symlink.put(0x80000025, 0, b'asdfasdfasdfasdfasdfasdf')
conn.fsctl(fd, libsmb.FSCTL_SET_REPARSE_POINT, b, 0)
conn.close(fd);
conn.close(fd)
fd1 = conn.create(
filename,
@ -233,7 +233,7 @@ class ReparsePoints(samba.tests.libsmb.LibsmbTests):
self.assertEqual(e.exception.args[0],
ntstatus.NT_STATUS_SHARING_VIOLATION)
conn.delete_on_close(fd1, 1);
conn.delete_on_close(fd1, 1)
conn.close(fd1)
if __name__ == '__main__':

View File

@ -187,8 +187,8 @@ class SegfaultTests(samba.tests.TestCase):
@segfault_detector
def test_dcerpc_idl_set_inline_arrays(self):
"""Setting an inline array was incorrectly handled."""
a = dnsserver.DNS_EXTENSION();
x = dnsserver.DNS_RPC_DP_INFO();
a = dnsserver.DNS_EXTENSION()
x = dnsserver.DNS_RPC_DP_INFO()
x.pwszReserved = [a, a, a]
@no_gdb_backtrace

View File

@ -147,7 +147,7 @@ class SMBTests(samba.tests.TestCase):
"""Returns whether a regular file exists (by trying to open it)"""
try:
self.smb_conn.loadfile(filepath)
exists = True;
exists = True
except NTSTATUSError as err:
if (err.args[0] == NT_STATUS_OBJECT_NAME_NOT_FOUND or
err.args[0] == NT_STATUS_OBJECT_PATH_NOT_FOUND):

View File

@ -95,7 +95,7 @@ class Smb2SymlinkTests(samba.tests.libsmb.LibsmbTests):
target="foo"
suffix="bar"
self.create_symlink(smb1, target, symlink);
self.create_symlink(smb1, target, symlink)
with self.assertRaises(NTSTATUSError) as e:
fd = smb2.create_ex(f'{symlink}\\{suffix}')
@ -115,7 +115,7 @@ class Smb2SymlinkTests(samba.tests.libsmb.LibsmbTests):
symlink="syml"
target="foo"
self.create_symlink(smb1, target, symlink);
self.create_symlink(smb1, target, symlink)
with self.assertRaises(NTSTATUSError) as e:
fd = smb2.create_ex(f'{symlink}')

View File

@ -27,7 +27,7 @@ class fuzzsmbd(samba.tests.TestCase):
# terminated SMB1 Negprot, with a valid SessionSetup after.
# BUG: #14205 causes the smbd server to crash.
#
state = True;
state = True
badblob = binascii.a2b_base64("AAAA1P9TTUJyAAAAABhDyAAAAAAAAAAAAAAAACcA/v8AAAAAALEAAlBDIE5F"
"VFdPUksgUFJPR1JBTSD//jAAAk1JQ1JPU09GVCBOR1RXT1JLUyAxLjANDAJN"
"SR3hkXOl0mb+QXW4Da/jp0f+AAAA1P9TTUJyAAAAABgDyAAABDQAAAAAAAAA"
@ -71,6 +71,6 @@ class fuzzsmbd(samba.tests.TestCase):
for line in open(os.environ['SMBD_TEST_LOG']):
if "INTERNAL ERROR: Signal 11 in pid" in line:
print("Found crash in smbd log")
state = False;
state = False
break
self.assertTrue(state)