diff options
author | Tom Rini <trini@konsulko.com> | 2025-04-07 16:40:02 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-08 11:43:23 -0600 |
commit | ff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch) | |
tree | dcfe4bc52848a5637c975a3352b57885e5b8a06d /test/py/tests/test_fs/test_mkdir.py | |
parent | 34820924edbc4ec7803eb89d9852f4b870fa760a (diff) | |
parent | f892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff) |
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86:
emulation: Disable bloblist for now") as that was intended only for the
release due to time.
Diffstat (limited to 'test/py/tests/test_fs/test_mkdir.py')
-rw-r--r-- | test/py/tests/test_fs/test_mkdir.py | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/test/py/tests/test_fs/test_mkdir.py b/test/py/tests/test_fs/test_mkdir.py index fa9561ec359..1578c3cba3a 100644 --- a/test/py/tests/test_fs/test_mkdir.py +++ b/test/py/tests/test_fs/test_mkdir.py @@ -14,108 +14,108 @@ from fstest_helpers import assert_fs_integrity @pytest.mark.boardspec('sandbox') @pytest.mark.slow class TestMkdir(object): - def test_mkdir1(self, u_boot_console, fs_obj_mkdir): + def test_mkdir1(self, ubman, fs_obj_mkdir): """ Test Case 1 - create a directory under a root """ - fs_type,fs_img = fs_obj_mkdir - with u_boot_console.log.section('Test Case 1 - mkdir'): - output = u_boot_console.run_command_list([ + fs_type,fs_cmd_prefix,fs_img = fs_obj_mkdir + with ubman.log.section('Test Case 1 - mkdir'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, - '%smkdir host 0:0 dir1' % fs_type, - '%sls host 0:0 /' % fs_type]) + '%smkdir host 0:0 dir1' % fs_cmd_prefix, + '%sls host 0:0 /' % fs_cmd_prefix]) assert('dir1/' in ''.join(output)) - output = u_boot_console.run_command( - '%sls host 0:0 dir1' % fs_type) + output = ubman.run_command( + '%sls host 0:0 dir1' % fs_cmd_prefix) assert('./' in output) assert('../' in output) assert_fs_integrity(fs_type, fs_img) - def test_mkdir2(self, u_boot_console, fs_obj_mkdir): + def test_mkdir2(self, ubman, fs_obj_mkdir): """ Test Case 2 - create a directory under a sub-directory """ - fs_type,fs_img = fs_obj_mkdir - with u_boot_console.log.section('Test Case 2 - mkdir (sub-sub directory)'): - output = u_boot_console.run_command_list([ + fs_type,fs_cmd_prefix,fs_img = fs_obj_mkdir + with ubman.log.section('Test Case 2 - mkdir (sub-sub directory)'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, - '%smkdir host 0:0 dir1/dir2' % fs_type, - '%sls host 0:0 dir1' % fs_type]) + '%smkdir host 0:0 dir1/dir2' % fs_cmd_prefix, + '%sls host 0:0 dir1' % fs_cmd_prefix]) assert('dir2/' in ''.join(output)) - output = u_boot_console.run_command( - '%sls host 0:0 dir1/dir2' % fs_type) + output = ubman.run_command( + '%sls host 0:0 dir1/dir2' % fs_cmd_prefix) assert('./' in output) assert('../' in output) assert_fs_integrity(fs_type, fs_img) - def test_mkdir3(self, u_boot_console, fs_obj_mkdir): + def test_mkdir3(self, ubman, fs_obj_mkdir): """ Test Case 3 - trying to create a directory with a non-existing path should fail """ - fs_type,fs_img = fs_obj_mkdir - with u_boot_console.log.section('Test Case 3 - mkdir (non-existing path)'): - output = u_boot_console.run_command_list([ + fs_type,fs_cmd_prefix,fs_img = fs_obj_mkdir + with ubman.log.section('Test Case 3 - mkdir (non-existing path)'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, - '%smkdir host 0:0 none/dir3' % fs_type]) + '%smkdir host 0:0 none/dir3' % fs_cmd_prefix]) assert('Unable to create a directory' in ''.join(output)) assert_fs_integrity(fs_type, fs_img) - def test_mkdir4(self, u_boot_console, fs_obj_mkdir): + def test_mkdir4(self, ubman, fs_obj_mkdir): """ Test Case 4 - trying to create "." should fail """ - fs_type,fs_img = fs_obj_mkdir - with u_boot_console.log.section('Test Case 4 - mkdir (".")'): - output = u_boot_console.run_command_list([ + fs_type,fs_cmd_prefix,fs_img = fs_obj_mkdir + with ubman.log.section('Test Case 4 - mkdir (".")'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, - '%smkdir host 0:0 .' % fs_type]) + '%smkdir host 0:0 .' % fs_cmd_prefix]) assert('Unable to create a directory' in ''.join(output)) assert_fs_integrity(fs_type, fs_img) - def test_mkdir5(self, u_boot_console, fs_obj_mkdir): + def test_mkdir5(self, ubman, fs_obj_mkdir): """ Test Case 5 - trying to create ".." should fail """ - fs_type,fs_img = fs_obj_mkdir - with u_boot_console.log.section('Test Case 5 - mkdir ("..")'): - output = u_boot_console.run_command_list([ + fs_type,fs_cmd_prefix,fs_img = fs_obj_mkdir + with ubman.log.section('Test Case 5 - mkdir ("..")'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, - '%smkdir host 0:0 ..' % fs_type]) + '%smkdir host 0:0 ..' % fs_cmd_prefix]) assert('Unable to create a directory' in ''.join(output)) assert_fs_integrity(fs_type, fs_img) - def test_mkdir6(self, u_boot_console, fs_obj_mkdir): + def test_mkdir6(self, ubman, fs_obj_mkdir): """ 'Test Case 6 - create as many directories as amount of directory entries goes beyond a cluster size)' """ - fs_type,fs_img = fs_obj_mkdir - with u_boot_console.log.section('Test Case 6 - mkdir (create many)'): - output = u_boot_console.run_command_list([ + fs_type,fs_cmd_prefix,fs_img = fs_obj_mkdir + with ubman.log.section('Test Case 6 - mkdir (create many)'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, - '%smkdir host 0:0 dir6' % fs_type, - '%sls host 0:0 /' % fs_type]) + '%smkdir host 0:0 dir6' % fs_cmd_prefix, + '%sls host 0:0 /' % fs_cmd_prefix]) assert('dir6/' in ''.join(output)) for i in range(0, 20): - output = u_boot_console.run_command( + output = ubman.run_command( '%smkdir host 0:0 dir6/0123456789abcdef%02x' - % (fs_type, i)) - output = u_boot_console.run_command('%sls host 0:0 dir6' % fs_type) + % (fs_cmd_prefix, i)) + output = ubman.run_command('%sls host 0:0 dir6' % fs_cmd_prefix) assert('0123456789abcdef00/' in output) assert('0123456789abcdef13/' in output) - output = u_boot_console.run_command( - '%sls host 0:0 dir6/0123456789abcdef13/.' % fs_type) + output = ubman.run_command( + '%sls host 0:0 dir6/0123456789abcdef13/.' % fs_cmd_prefix) assert('./' in output) assert('../' in output) - output = u_boot_console.run_command( - '%sls host 0:0 dir6/0123456789abcdef13/..' % fs_type) + output = ubman.run_command( + '%sls host 0:0 dir6/0123456789abcdef13/..' % fs_cmd_prefix) assert('0123456789abcdef00/' in output) assert('0123456789abcdef13/' in output) assert_fs_integrity(fs_type, fs_img) |