blob: 1f2deb1505256df89466797f12f6f5b80e5acabf [file] [log] [blame]
Bin Meng261fc062021-02-25 17:22:35 +08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Tests for addrmap command
4 *
5 * Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com>
6 */
7
Bin Meng261fc062021-02-25 17:22:35 +08008#include <console.h>
9#include <test/suites.h>
10#include <test/ut.h>
11
12/* Declare a new addrmap test */
Simon Glassb15512c2025-01-20 14:25:32 -070013#define ADDRMAP_TEST(_name, _flags) UNIT_TEST(_name, _flags, addrmap)
Bin Meng261fc062021-02-25 17:22:35 +080014
15/* Test 'addrmap' command output */
16static int addrmap_test_basic(struct unit_test_state *uts)
17{
Bin Meng261fc062021-02-25 17:22:35 +080018 ut_assertok(run_command("addrmap", 0));
19 ut_assert_nextline(" vaddr paddr size");
20 ut_assert_nextline("================ ================ ================");
21 /* There should be at least one entry */
22 ut_assertok(!ut_check_console_end(uts));
23
24 return 0;
25}
Simon Glass11fcfa32024-08-22 07:57:50 -060026ADDRMAP_TEST(addrmap_test_basic, UTF_CONSOLE);