diff options
author | Simon Glass <sjg@chromium.org> | 2022-09-21 17:21:47 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-09-25 22:59:56 +0300 |
commit | 22c80d5603ac4c58debc8c776b8f138e76cf5f7c (patch) | |
tree | a6bd3d83314fee80b1b1a2e9a39df39d96a2dcc8 /test/py | |
parent | 46df0243942f98ad5a6b57cb65b31acdc88559f8 (diff) | |
download | u-boot-22c80d5603ac4c58debc8c776b8f138e76cf5f7c.tar.xz |
sandbox: Add a test for SCSI
Add a simple uclass test for SCSI. It reads the partition table from a
disk image and checks that it looks correct.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/tests/test_ut.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py index 35fb393c1f..9d42390373 100644 --- a/test/py/tests/test_ut.py +++ b/test/py/tests/test_ut.py @@ -114,6 +114,15 @@ def test_ut_dm_init(u_boot_console): with open(fn, 'wb') as fh: fh.write(data) + # Create a file with a single partition + fn = u_boot_console.config.source_dir + '/scsi.img' + if not os.path.exists(fn): + data = b'\x00' * (2 * 1024 * 1024) + with open(fn, 'wb') as fh: + fh.write(data) + u_boot_utils.run_and_log( + u_boot_console, f'sfdisk {fn}', stdin=b'type=83') + @pytest.mark.buildconfigspec('cmd_bootflow') def test_ut_dm_init_bootstd(u_boot_console): """Initialise data for bootflow tests""" |