Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix random test #5520

Merged
merged 6 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion .github/scripts/hypo/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def fsck(self, entry, repair=False, recuisive=False, user='root'):
@rule(
entry = Entries.filter(lambda x: x != multiple()),
parent = Folders.filter(lambda x: x != multiple()),
new_entry_name = st_entry_name,
new_entry_name = st_file_name,
user = st_sudo_user,
preserve = st.booleans()
)
Expand Down
2 changes: 0 additions & 2 deletions .github/scripts/hypo/command_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
__import__('xattr')
except ImportError:
subprocess.check_call(["pip", "install", "xattr"])
from common import is_jfs, get_acl, get_root, get_stat
from typing import Dict
try:
__import__('psutil')
except ImportError:
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/hypo/command_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class TestCommand(unittest.TestCase):
def test_dump(self):
state = JuicefsCommandMachine()
folders_0 = state.init_folders()
files_0 = state.create_file(content=b'', file_name='aazz', mode='w', parent=folders_0, umask=312, user='root')
files_0 = state.create_file(content='', file_name='aazz', mode='w', parent=folders_0, umask=312, user='root')
value = ''.join([chr(i) for i in range(256)])
value = value.encode('latin-1')
value = b'\x2580q\x2589'
Expand All @@ -17,14 +17,14 @@ def test_dump(self):
def skip_test_info(self):
state = JuicefsCommandMachine()
folders_0 = state.init_folders()
files_2 = state.create_file(content=b'0', file_name='mvvd', mode='a', parent=folders_0, umask=293, user='root')
files_2 = state.create_file(content='0', file_name='mvvd', mode='a', parent=folders_0, umask=293, user='root')
state.info(entry=folders_0, raw=True, recuisive=True, user='user1')
state.teardown()

def test_clone(self):
state = JuicefsCommandMachine()
v1 = state.init_folders()
v2 = state.create_file(content=b'\x9bcR\xba', file_name='ygbl', mode='x', parent=v1, umask=466, user='root')
v2 = state.create_file(content='\x9bcR\xba', file_name='ygbl', mode='x', parent=v1, umask=466, user='root')
state.chmod(entry=v1, mode=715, user='root')
state.clone(entry=v2, new_entry_name='drqj', parent=v1, preserve=False, user='user1')
state.teardown()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/command2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ jobs:
grep "<FATAL>:" /var/log/juicefs.log && exit 1 || true

- name: Setup upterm session
# if: failure() && (github.event.inputs.debug == 'true' || github.run_attempt != 1)
if: failure()
if: failure() && (github.event.inputs.debug == 'true' || github.run_attempt != 1)
# if: failure()
timeout-minutes: 60
uses: lhotari/action-upterm@v1

Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/fsrand.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: "fsrand"

on:
# push:
# branches:
# - main
# - release**
# paths:
# - '**/fsrand.yml'
# - '**/fs.py'
# - '**/fs_test.py'
# - '**/fs_acl_test.py'
# pull_request:
# branches:
# - main
# - release**
# paths:
# - '**/fsrand2.yml'
# - '**/fs.py'
# - '**/fs_test.py'
# - '**/fs_acl_test.py'
push:
branches:
- main
- release**
paths:
- '**/fsrand.yml'
- '**/fs.py'
- '**/fs_test.py'
- '**/fs_acl_test.py'
pull_request:
branches:
- main
- release**
paths:
- '**/fsrand2.yml'
- '**/fs.py'
- '**/fs_test.py'
- '**/fs_acl_test.py'
schedule:
- cron: '0 17 * * 0'
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions sdk/python/juicefs/juicefs/juicefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
MODE_WRITE = 2
MODE_READ = 4

XATTR_CREATE = 1
XATTR_REPLACE = 2

def check_error(r, fn, args):
if r < 0:
e = OSError(f'call {fn.__name__} failed: [Errno {-r}] {os.strerror(-r)}: {args[2:]}')
Expand Down
Loading