summaryrefslogtreecommitdiff
path: root/test/command_ut.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-06-12 16:28:32 (GMT)
committerSimon Glass <sjg@chromium.org>2014-06-23 21:37:23 (GMT)
commit4d907025d6a530c0f3d2e869331e863c3e3cc3c2 (patch)
tree13136d24960b410c33dc758b6f0a5097664c53a0 /test/command_ut.c
parentdbb7234b2a5e7d2cdb6658156de8d2d5b54033d7 (diff)
downloadu-boot-fsl-qoriq-4d907025d6a530c0f3d2e869331e863c3e3cc3c2.tar.xz
sandbox: restore ability to access host fs through standard commands
Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree" removed the ability for get_device_and_partition() to handle the "host" device type, and redirect accesses to it to the host filesystem. This broke some unit tests that use this feature. So, revert that change. The code added back by this patch is slightly different to pacify checkpatch. However, we're then left with "host" being both: - A pseudo device that accesses the hosts real filesystem. - An emulated block device, which accesses "sectors" inside a file stored on the host. In order to resolve this discrepancy, rename the pseudo device from host to hostfs, and adjust the unit-tests for this change. The "help sb" output is modified to reflect this rename, and state where the host and hostfs devices should be used. Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Josh Wu <josh.wu@atmel.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/command_ut.c')
-rw-r--r--test/command_ut.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/command_ut.c b/test/command_ut.c
index b2666bf..ae6466d 100644
--- a/test/command_ut.c
+++ b/test/command_ut.c
@@ -165,12 +165,12 @@ static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#ifdef CONFIG_SANDBOX
/* File existence */
- HUSH_TEST(e, "-e host - creating_this_file_breaks_uboot_unit_test", n);
- run_command("sb save host - creating_this_file_breaks_uboot_unit_test 0 1", 0);
- HUSH_TEST(e, "-e host - creating_this_file_breaks_uboot_unit_test", y);
+ HUSH_TEST(e, "-e hostfs - creating_this_file_breaks_uboot_unit_test", n);
+ run_command("sb save hostfs - creating_this_file_breaks_uboot_unit_test 0 1", 0);
+ HUSH_TEST(e, "-e hostfs - creating_this_file_breaks_uboot_unit_test", y);
/* Perhaps this could be replaced by an "rm" shell command one day */
assert(!os_unlink("creating_this_file_breaks_uboot_unit_test"));
- HUSH_TEST(e, "-e host - creating_this_file_breaks_uboot_unit_test", n);
+ HUSH_TEST(e, "-e hostfs - creating_this_file_breaks_uboot_unit_test", n);
#endif
#endif