diff options
| author | Alexander Gendin <[email protected]> | 2023-10-09 01:24:36 +0000 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-10-24 17:05:24 -0400 |
| commit | 04291ee0aba6d731bd66bcae5080e126d6c0411b (patch) | |
| tree | ecc87083ddf3df1f18d455bc45aef2e839762a2e /test/py | |
| parent | 9859edd3fc10ffb63f53e1d21aa6eb34b688f6da (diff) | |
cmd: mbr: Allow 4 MBR partitions without need for extended
Current code allows up to 3 MBR partitions without extended one.
If more than 3 partitions are required, then extended partition(s)
must be used.
This commit allows up to 4 primary MBR partitions without the
need for extended partition.
Add mbr test unit. In order to run the test manually, mmc6.img file
of size 12 MiB or greater is required in the same directory as u-boot.
Test also runs automatically via ./test/py/test.py tool.
Running mbr test is only supported in sandbox mode.
Signed-off-by: Alex Gendin <[email protected]>
[ And due to some further changes for testing ]
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test/py')
| -rw-r--r-- | test/py/tests/test_ut.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py index 82932a662bf..1d9149a3f68 100644 --- a/test/py/tests/test_ut.py +++ b/test/py/tests/test_ut.py @@ -433,7 +433,6 @@ def setup_cedit_file(cons): u_boot_utils.run_and_log( cons, f'{expo_tool} -e {inhname} -l {infname} -o {outfname}') - @pytest.mark.buildconfigspec('ut_dm') def test_ut_dm_init(u_boot_console): """Initialize data for ut dm tests.""" @@ -463,6 +462,12 @@ def test_ut_dm_init(u_boot_console): fs_helper.mk_fs(u_boot_console.config, 'ext2', 0x200000, '2MB') fs_helper.mk_fs(u_boot_console.config, 'fat32', 0x100000, '1MB') + mmc_dev = 6 + fn = os.path.join(u_boot_console.config.source_dir, f'mmc{mmc_dev}.img') + data = b'\x00' * (12 * 1024 * 1024) + with open(fn, 'wb') as fh: + fh.write(data) + @pytest.mark.buildconfigspec('cmd_bootflow') def test_ut_dm_init_bootstd(u_boot_console): """Initialise data for bootflow tests""" |
