Abdellatif El Khlifi | 5ad079f | 2023-08-04 14:33:43 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Test for armffa command |
| 4 | * |
| 5 | * Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com> |
| 6 | * |
| 7 | * Authors: |
| 8 | * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> |
| 9 | */ |
| 10 | |
| 11 | #include <common.h> |
| 12 | #include <string.h> |
| 13 | #include <asm/sandbox_arm_ffa.h> |
| 14 | #include <dm/test.h> |
| 15 | #include <test/test.h> |
| 16 | #include <test/ut.h> |
| 17 | |
| 18 | /* Basic test of 'armffa' command */ |
| 19 | static int dm_test_armffa_cmd(struct unit_test_state *uts) |
| 20 | { |
| 21 | /* armffa getpart <UUID> */ |
| 22 | ut_assertok(run_command("armffa getpart " SANDBOX_SERVICE1_UUID, 0)); |
| 23 | |
| 24 | /* armffa ping <ID> */ |
| 25 | ut_assertok(run_commandf("armffa ping 0x%x", SANDBOX_SP1_ID)); |
| 26 | |
| 27 | /* armffa devlist */ |
| 28 | ut_assertok(run_command("armffa devlist", 0)); |
| 29 | |
| 30 | return 0; |
| 31 | } |
| 32 | |
| 33 | DM_TEST(dm_test_armffa_cmd, UT_TESTF_SCAN_FDT | UT_TESTF_CONSOLE_REC); |