[PATCH 00/17] dm: sandbox: Add a new HOST uclass
Simon Glass
sjg at chromium.org
Sun Oct 30 02:47:02 CET 2022
At present sandbox uses the root device as the parent for block devices it
creates to provide access to files on the host. This is convenient but is
not really correct, since the root device should not have any particular
meaning for its children.
This series tidies this up, introducing a new uclass and updating the
implementation accordingly. Rather than numbering host devices, it is now
possible to provide a label, which is easier to deal with.
The host command has some minor updates, including showing the label. A
test and documentation are added for it also.
A few other minor improvements are included also.
Simon Glass (17):
dm: sandbox: Drop non-BLK code from host implementation
sandbox: Add missing comments for os_alarm()
test: Split out mk_fs function into a helper
test: Correct pylint warnings in fs_helper
dm: test: Drop the special function for running DM tests
dm: test: Clear the block cache after running a test
test: Drop an unused parameter to ut_run_test_live_flat()
test: Tidy up help for ut command
test: doc: Add documentation for ut command
test: Allow showing basic information about tests
test: Add a way to detect a test that breaks another
dm: blk: Tidy up obtaining a block device from its parent
dm: sandbox: Create a new HOST uclass
dm: sandbox: Create a block driver
dm: sandbox: Switch over to using the new host uclass
dm: Add documentation for host command and implementation
dm: Add tests for the sandbox host driver
arch/sandbox/cpu/spl.c | 2 +-
arch/sandbox/dts/sandbox.dts | 4 -
cmd/host.c | 210 ++++++++++------
disk/part.c | 4 +-
doc/arch/index.rst | 2 +-
doc/arch/sandbox/block_impl.rst | 39 +++
doc/arch/sandbox/index.rst | 12 +
doc/arch/{ => sandbox}/sandbox.rst | 9 +-
doc/develop/tests_sandbox.rst | 69 +++++
doc/usage/cmd/host.rst | 116 +++++++++
doc/usage/cmd/ut.rst | 117 +++++++++
doc/usage/index.rst | 2 +
drivers/block/Makefile | 2 +-
drivers/block/blk-uclass.c | 28 ++-
drivers/block/blkcache.c | 23 +-
drivers/block/host-uclass.c | 176 +++++++++++++
drivers/block/host_dev.c | 142 +++++++++++
drivers/block/sandbox.c | 236 ++----------------
include/blk.h | 37 ++-
include/dm/uclass-id.h | 1 +
include/os.h | 4 +
include/sandbox_host.h | 125 ++++++++++
include/sandboxblockdev.h | 31 ---
include/test/ut.h | 7 +-
lib/efi_loader/efi_device_path.c | 5 +-
lib/efi_loader/efi_disk.c | 2 +-
test/cmd_ut.c | 80 ++++--
test/dm/Makefile | 1 +
test/dm/blk.c | 49 ++--
test/dm/host.c | 195 +++++++++++++++
test/dm/test-dm.c | 49 +---
test/py/tests/fs_helper.py | 68 +++++
.../py/tests/test_eficonfig/test_eficonfig.py | 3 +
test/py/tests/test_fs/conftest.py | 58 +----
test/py/tests/test_ut.py | 6 +
test/test-main.c | 47 +++-
36 files changed, 1435 insertions(+), 526 deletions(-)
create mode 100644 doc/arch/sandbox/block_impl.rst
create mode 100644 doc/arch/sandbox/index.rst
rename doc/arch/{ => sandbox}/sandbox.rst (98%)
create mode 100644 doc/usage/cmd/host.rst
create mode 100644 doc/usage/cmd/ut.rst
create mode 100644 drivers/block/host-uclass.c
create mode 100644 drivers/block/host_dev.c
create mode 100644 include/sandbox_host.h
delete mode 100644 include/sandboxblockdev.h
create mode 100644 test/dm/host.c
create mode 100644 test/py/tests/fs_helper.py
--
2.38.1.273.g43a17bfeac-goog
More information about the U-Boot
mailing list