diff options
| author | Tom Rini <[email protected]> | 2023-08-21 17:32:17 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-08-21 17:32:17 -0400 |
| commit | 7e6e40c572332b3835c5cb48a08e1d8d404c871c (patch) | |
| tree | cf8ebf03fbe72c1334880f75fe2c9f71c7bb95ff /test/cmd | |
| parent | 3881c9fbb7fdd98f6eae5cd33f7e9abe9455a585 (diff) | |
| parent | 976fb2ffa3875a7bed9866bf5cf939a81c423ef8 (diff) | |
Merge tag 'v2023.10-rc3' into next
Prepare v2023.10-rc3
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'test/cmd')
| -rw-r--r-- | test/cmd/Makefile | 2 | ||||
| -rw-r--r-- | test/cmd/armffa.c | 33 |
2 files changed, 35 insertions, 0 deletions
diff --git a/test/cmd/Makefile b/test/cmd/Makefile index a3cf983739e..6e3d7e919ef 100644 --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0+ # # Copyright (c) 2013 Google, Inc +# Copyright 2022-2023 Arm Limited and/or its affiliates <[email protected]> ifdef CONFIG_HUSH_PARSER obj-$(CONFIG_CONSOLE_RECORD) += test_echo.o @@ -24,6 +25,7 @@ obj-$(CONFIG_CMD_SEAMA) += seama.o ifdef CONFIG_SANDBOX obj-$(CONFIG_CMD_READ) += rw.o obj-$(CONFIG_CMD_SETEXPR) += setexpr.o +obj-$(CONFIG_ARM_FFA_TRANSPORT) += armffa.o endif obj-$(CONFIG_CMD_TEMPERATURE) += temperature.o obj-$(CONFIG_CMD_WGET) += wget.o diff --git a/test/cmd/armffa.c b/test/cmd/armffa.c new file mode 100644 index 00000000000..9a44a397e8a --- /dev/null +++ b/test/cmd/armffa.c @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Test for armffa command + * + * Copyright 2022-2023 Arm Limited and/or its affiliates <[email protected]> + * + * Authors: + * Abdellatif El Khlifi <[email protected]> + */ + +#include <common.h> +#include <string.h> +#include <asm/sandbox_arm_ffa.h> +#include <dm/test.h> +#include <test/test.h> +#include <test/ut.h> + +/* Basic test of 'armffa' command */ +static int dm_test_armffa_cmd(struct unit_test_state *uts) +{ + /* armffa getpart <UUID> */ + ut_assertok(run_command("armffa getpart " SANDBOX_SERVICE1_UUID, 0)); + + /* armffa ping <ID> */ + ut_assertok(run_commandf("armffa ping 0x%x", SANDBOX_SP1_ID)); + + /* armffa devlist */ + ut_assertok(run_command("armffa devlist", 0)); + + return 0; +} + +DM_TEST(dm_test_armffa_cmd, UT_TESTF_SCAN_FDT | UT_TESTF_CONSOLE_REC); |
