diff options
author | Tom Rini <trini@konsulko.com> | 2025-03-15 08:19:31 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-03-15 08:19:31 -0600 |
commit | 0e1fc465fea62ebae91f2f56cb823e8b37ee1077 (patch) | |
tree | 14ea0ca0ef443959df1ac5afa7b5114e6910bf77 /test/py/tests/test_fs/test_symlink.py | |
parent | 00dfb7038ea4dfe9d9667143bfecd11c05cab6fa (diff) | |
parent | 13e8d14442a85a8556211a9950a5b6f80b447901 (diff) |
Merge tag 'dm-pull-15mar25' of git://git.denx.de/u-boot-dm into next
Sync up on test renames
Diffstat (limited to 'test/py/tests/test_fs/test_symlink.py')
-rw-r--r-- | test/py/tests/test_fs/test_symlink.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/py/tests/test_fs/test_symlink.py b/test/py/tests/test_fs/test_symlink.py index 9ced101a294..9ffd7e6e54d 100644 --- a/test/py/tests/test_fs/test_symlink.py +++ b/test/py/tests/test_fs/test_symlink.py @@ -18,38 +18,38 @@ from fstest_helpers import assert_fs_integrity @pytest.mark.boardspec('sandbox') @pytest.mark.slow class TestSymlink(object): - def test_symlink1(self, u_boot_console, fs_obj_symlink): + def test_symlink1(self, ubman, fs_obj_symlink): """ Test Case 1 - create a link. and follow it when reading """ fs_type, fs_img, md5val = fs_obj_symlink - with u_boot_console.log.section('Test Case 1 - create link and read'): - output = u_boot_console.run_command_list([ + with ubman.log.section('Test Case 1 - create link and read'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, 'setenv filesize', 'ln host 0:0 %s /%s.link ' % (SMALL_FILE, SMALL_FILE), ]) assert('' in ''.join(output)) - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ '%sload host 0:0 %x /%s.link' % (fs_type, ADDR, SMALL_FILE), 'printenv filesize']) assert('filesize=100000' in ''.join(output)) # Test Case 4b - Read full 1MB of small file - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ 'md5sum %x $filesize' % ADDR, 'setenv filesize']) assert(md5val[0] in ''.join(output)) assert_fs_integrity(fs_type, fs_img) - def test_symlink2(self, u_boot_console, fs_obj_symlink): + def test_symlink2(self, ubman, fs_obj_symlink): """ Test Case 2 - create chained links """ fs_type, fs_img, md5val = fs_obj_symlink - with u_boot_console.log.section('Test Case 2 - create chained links'): - output = u_boot_console.run_command_list([ + with ubman.log.section('Test Case 2 - create chained links'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, 'setenv filesize', 'ln host 0:0 %s /%s.link1 ' % (SMALL_FILE, SMALL_FILE), @@ -60,25 +60,25 @@ class TestSymlink(object): ]) assert('' in ''.join(output)) - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ '%sload host 0:0 %x /%s.link3' % (fs_type, ADDR, SMALL_FILE), 'printenv filesize']) assert('filesize=100000' in ''.join(output)) # Test Case 4b - Read full 1MB of small file - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ 'md5sum %x $filesize' % ADDR, 'setenv filesize']) assert(md5val[0] in ''.join(output)) assert_fs_integrity(fs_type, fs_img) - def test_symlink3(self, u_boot_console, fs_obj_symlink): + def test_symlink3(self, ubman, fs_obj_symlink): """ Test Case 3 - replace file/link with link """ fs_type, fs_img, md5val = fs_obj_symlink - with u_boot_console.log.section('Test Case 1 - create link and read'): - output = u_boot_console.run_command_list([ + with ubman.log.section('Test Case 1 - create link and read'): + output = ubman.run_command_list([ 'host bind 0 %s' % fs_img, 'setenv filesize', 'ln host 0:0 %s /%s ' % (MEDIUM_FILE, SMALL_FILE), @@ -86,45 +86,45 @@ class TestSymlink(object): ]) assert('' in ''.join(output)) - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ '%sload host 0:0 %x /%s' % (fs_type, ADDR, SMALL_FILE), 'printenv filesize']) assert('filesize=a00000' in ''.join(output)) - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ 'md5sum %x $filesize' % ADDR, 'setenv filesize']) assert(md5val[1] in ''.join(output)) - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ 'ln host 0:0 %s.link /%s ' % (MEDIUM_FILE, SMALL_FILE), '%sload host 0:0 %x /%s' % (fs_type, ADDR, SMALL_FILE), 'printenv filesize']) assert('filesize=a00000' in ''.join(output)) - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ 'md5sum %x $filesize' % ADDR, 'setenv filesize']) assert(md5val[1] in ''.join(output)) assert_fs_integrity(fs_type, fs_img) - def test_symlink4(self, u_boot_console, fs_obj_symlink): + def test_symlink4(self, ubman, fs_obj_symlink): """ Test Case 4 - create a broken link """ fs_type, fs_img, md5val = fs_obj_symlink - with u_boot_console.log.section('Test Case 1 - create link and read'): + with ubman.log.section('Test Case 1 - create link and read'): - output = u_boot_console.run_command_list([ + output = ubman.run_command_list([ 'setenv filesize', 'ln host 0:0 nowhere /link ', ]) assert('' in ''.join(output)) - output = u_boot_console.run_command( + output = ubman.run_command( '%sload host 0:0 %x /link' % (fs_type, ADDR)) - with u_boot_console.disable_check('error_notification'): - output = u_boot_console.run_command('printenv filesize') + with ubman.disable_check('error_notification'): + output = ubman.run_command('printenv filesize') assert('"filesize" not defined' in ''.join(output)) assert_fs_integrity(fs_type, fs_img) |