diff options
| author | Tom Rini <[email protected]> | 2026-02-07 11:51:43 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-02-07 11:51:43 -0600 |
| commit | b887a1c1a1110582d178faad4397a0197938454e (patch) | |
| tree | 6f902115518ca668333f34095442b95646c71af1 /test | |
| parent | 2ffab9da9142c03dc0f2ce056ccd2b0f43c02742 (diff) | |
| parent | b4842032d542cfde271aab61b80ab870b27b07b2 (diff) | |
Merge patch series "Add command for getting ramsize in scripts"
Frank Wunderlich <[email protected]> says:
Add command for getting ramsize in scripts
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'test')
| -rw-r--r-- | test/cmd/meminfo.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/cmd/meminfo.c b/test/cmd/meminfo.c index d91fa6fcead..c9aae33f7c1 100644 --- a/test/cmd/meminfo.c +++ b/test/cmd/meminfo.c @@ -7,6 +7,7 @@ */ #include <dm/test.h> +#include <env.h> #include <test/cmd.h> #include <test/ut.h> @@ -49,4 +50,23 @@ static int cmd_test_meminfo(struct unit_test_state *uts) return 0; } + CMD_TEST(cmd_test_meminfo, UTF_CONSOLE); + +/* Test 'memsize' command */ +#ifdef CONFIG_CMD_MEMSIZE +static int cmd_test_memsize(struct unit_test_state *uts) +{ + ut_assertok(run_command("memsize", 0)); + ut_assert_nextline("256 MiB"); + ut_assert_console_end(); + + ut_assertok(run_command("memsize memsz", 0)); + ut_asserteq_str("256", env_get("memsz")); + ut_assert_console_end(); + + return 0; +} + +CMD_TEST(cmd_test_memsize, UTF_CONSOLE); +#endif |
