Skip to content

Commit

Permalink
fix acl
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingPoeta committed Jan 7, 2025
1 parent b713490 commit 29cdc1c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/command/acl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ test_acl_with_kernel_check()
prepare_test
./juicefs format $META_URL myjfs --enable-acl --trash-days 0
./juicefs mount -d $META_URL /tmp/jfs
python3 .github/scripts/hypo/acl_test.py
python3 .github/scripts/hypo/fs_acl_test.py
}

test_acl_with_user_space_check()
{
prepare_test
./juicefs format $META_URL myjfs --enable-acl --trash-days 0
./juicefs mount -d $META_URL /tmp/jfs --non-default-permission
python3 .github/scripts/hypo/acl_test.py
python3 .github/scripts/hypo/fs_acl_test.py
}

test_modify_acl_config()
Expand Down
69 changes: 35 additions & 34 deletions .github/scripts/pysdk/pysdk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,40 +156,41 @@ def _test_link(self, file1, file2):
def test_link(self):
self._test_link(self.file1, self.file2)

# class SummaryTests(unittest.TestCase):
# # /test/dir1/file
# # /dir2
# # /file
# def setUp(self):
# if not v.exists(TESTFN):
# v.mkdir(TESTFN)
# create_file(TESTFILE)
# v.mkdir(TESTFN + '/dir1')
# create_file(TESTFN + '/dir1/file')
# v.mkdir(TESTFN + '/dir2')

# def test_summary(self):
# res = v.summary(TESTFILE, depth=258, entries=2)
# self.assertTrue(res=={"Length":7, "Files":1, "Dirs":0, "Size":4096})
# res = v.summary(TESTFN)
# self.assertTrue(res=={"Length":14, "Files":2, "Dirs":3, "Size":20480, "Entries": None})
# res = v.summary(TESTFN, depth=257, entries=1)
# self.assertTrue(res=={"Length":14, "Files":2, "Dirs":3, "Size":20480, "Entries":
# {"dir1":{"Length":7, "Files":1, "Dirs":1, "Size":8192, "Entries": None}}})
# res = v.summary(TESTFN, depth=258, entries=1)
# self.assertTrue(res=={"Length":14, "Files":2, "Dirs":3, "Size":20480, "Entries":
# {"dir1":{"Length":7, "Files":1, "Dirs":1, "Size":8192, "Entries": {
# "file": {"Length": 7, "Size": 4096, "Files": 1, "Dirs": 0}
# }}}})
# res = v.summary(TESTFN, depth=259, entries=4)
# self.assertTrue(res=={"Length":14, "Files":2, "Dirs":3, "Size":20480, "Entries":
# {
# "dir1":{"Length":7, "Files":1, "Dirs":1, "Size":8192, "Entries": {
# "file": {"Length": 7, "Size": 4096, "Files": 1, "Dirs": 0}
# }},
# "dir2": {"Length": 0, "Size": 4096, "Files": 0, "Dirs": 1, "Entries": {}},
# "file": {"Length": 7, "Size": 4096, "Files": 1, "Dirs": 0}
# }})
@unittest.skip("Skipping SummaryTests")
class SummaryTests(unittest.TestCase):
# /test/dir1/file
# /dir2
# /file
def setUp(self):
if not v.exists(TESTFN):
v.mkdir(TESTFN)
create_file(TESTFILE)
v.mkdir(TESTFN + '/dir1')
create_file(TESTFN + '/dir1/file')
v.mkdir(TESTFN + '/dir2')

def test_summary(self):
res = v.summary(TESTFILE, depth=258, entries=2)
self.assertTrue(res=={"Length":7, "Files":1, "Dirs":0, "Size":4096})
res = v.summary(TESTFN)
self.assertTrue(res=={"Length":14, "Files":2, "Dirs":3, "Size":20480, "Entries": None})
res = v.summary(TESTFN, depth=257, entries=1)
self.assertTrue(res=={"Length":14, "Files":2, "Dirs":3, "Size":20480, "Entries":
{"dir1":{"Length":7, "Files":1, "Dirs":1, "Size":8192, "Entries": None}}})
res = v.summary(TESTFN, depth=258, entries=1)
self.assertTrue(res=={"Length":14, "Files":2, "Dirs":3, "Size":20480, "Entries":
{"dir1":{"Length":7, "Files":1, "Dirs":1, "Size":8192, "Entries": {
"file": {"Length": 7, "Size": 4096, "Files": 1, "Dirs": 0}
}}}})
res = v.summary(TESTFN, depth=259, entries=4)
self.assertTrue(res=={"Length":14, "Files":2, "Dirs":3, "Size":20480, "Entries":
{
"dir1":{"Length":7, "Files":1, "Dirs":1, "Size":8192, "Entries": {
"file": {"Length": 7, "Size": 4096, "Files": 1, "Dirs": 0}
}},
"dir2": {"Length": 0, "Size": 4096, "Files": 0, "Dirs": 1, "Entries": {}},
"file": {"Length": 7, "Size": 4096, "Files": 1, "Dirs": 0}
}})

class NonLocalSymlinkTests(unittest.TestCase):
def setUp(self):
Expand Down
1 change: 0 additions & 1 deletion sdk/python/juicefs/juicefs/juicefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def mkdir(self, path, mode=0o777):

def makedirs(self, path, mode=0o777):
"""Create a directory and all its parent components if they do not exist."""
print("makedirs: ", path, "--: ", mode, "--: ", self.umask)
self.lib.jfs_mkdirAll(c_int64(_tid()), self.h, _bin(path), c_uint16(mode&0o777), c_uint16(self.umask))

def rmdir(self, path):
Expand Down

0 comments on commit 29cdc1c

Please sign in to comment.