mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
tests: Check that query_directory lists the reparse tag
With the source3/ based clilist.c, we can't test all infolevels where this matters (see callers of get_dirent_ea_size()). But porting the source4 based all-infolevel search code into source3/libsmb or doing this one the reparse point test in the source4 infrastructure to me seems like a lot of effort for moderate gain. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
747a7fec01
commit
1dba6d3cfc
@ -170,6 +170,26 @@ class ReparsePoints(samba.tests.libsmb.LibsmbTests):
|
||||
conn.delete_on_close(fd, 1)
|
||||
conn.close(fd)
|
||||
|
||||
def test_query_dir_reparse(self):
|
||||
conn = self.connection()
|
||||
filename = 'reparse'
|
||||
self.clean_file(conn, filename)
|
||||
|
||||
fd = conn.create(
|
||||
filename,
|
||||
DesiredAccess=sec.SEC_FILE_WRITE_ATTRIBUTE,
|
||||
CreateDisposition=libsmb.FILE_CREATE)
|
||||
b = reparse_symlink.symlink_put("y", "y", 0, 0)
|
||||
conn.fsctl(fd, libsmb.FSCTL_SET_REPARSE_POINT, b, 0)
|
||||
conn.close(fd)
|
||||
|
||||
dirents = conn.list("", filename)
|
||||
self.assertEqual(
|
||||
dirents[0]["reparse_tag"],
|
||||
libsmb.IO_REPARSE_TAG_SYMLINK)
|
||||
|
||||
self.clean_file(conn, filename)
|
||||
|
||||
# Show that directories can carry reparse points
|
||||
|
||||
def test_create_reparse_directory(self):
|
||||
|
@ -1,2 +1,3 @@
|
||||
^samba.tests.reparsepoints.samba.tests.reparsepoints.ReparsePoints.test_create_reparse_directory
|
||||
^samba.tests.reparsepoints.samba.tests.reparsepoints.ReparsePoints.test_create_reparse_nonempty_directory
|
||||
^samba.tests.reparsepoints.samba.tests.reparsepoints.ReparsePoints.test_query_dir_reparse
|
||||
|
Loading…
Reference in New Issue
Block a user