Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoucheng361 committed Dec 30, 2024
1 parent e506da7 commit 94b9fd5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/scripts/hypo/command_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def get_raw(self, size:str):
return size.split(' ')[0]

def parse_info(self, info: str):
print('info is', info)
li = info.split('\n')
filename = li[0].split(':')[0].strip()
# assert li[0].strip().startswith('inode:'), f'parse_info: {li[0]} should start with inode:'
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/hypo/command_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,22 @@ def test_clone_4834(self):
state.clone(entry=folders_1, new_entry_name='tbim', parent=folders_0, preserve=False, user='user1')
state.teardown()

def test_issue_x(self):
state = JuicefsCommandMachine()
folders_0 = state.init_folders()
files_0 = state.create_file(content=b'\xb3\xccK~\ti', file_name='zide', mode='w', parent=folders_0, umask=337, user='root')
state.read(file=files_0, length=8669, offset=7733, user='root')
state.info(entry=folders_0, raw=True, recuisive=False, strict=True, user='root')
state.read(file=files_0, length=2643, offset=10239, user='root')
files_1 = state.hardlink(dest_file=files_0, link_file_name='lpyy', parent=folders_0, umask=376, user='root')
state.chown(entry=files_1, owner='user1', user='user2')
state.clone_cp_dir(entry=folders_0, new_entry_name='dsuq', parent=folders_0, preserve=False, umask=290, user='root')
state.read(file=files_0, length=8367, offset=9939, user='root')
state.clone_cp_dir(entry=folders_0, new_entry_name='cmox', parent=folders_0, preserve=False, umask=157, user='root')
folders_1 = state.mkdir(mode=1782, parent=folders_0, subdir='qwzo', umask=187, user='root')
state.fsck(entry=folders_1, recuisive=True, repair=False, user='root')
state.info(entry=folders_1, raw=True, recuisive=False, strict=True, user='user1')
state.teardown()

if __name__ == '__main__':
unittest.main()

0 comments on commit 94b9fd5

Please sign in to comment.