From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70B5EC433EF for ; Fri, 15 Apr 2022 12:29:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C1FF1839B3; Fri, 15 Apr 2022 14:29:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5CC36839B3; Fri, 15 Apr 2022 14:29:14 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 9217F83965 for ; Fri, 15 Apr 2022 14:29:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=abdellatif.elkhlifi@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DDBF0139F; Fri, 15 Apr 2022 05:29:10 -0700 (PDT) Received: from e121910.arm.com (unknown [10.57.9.4]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 072EB3F73B; Fri, 15 Apr 2022 05:29:03 -0700 (PDT) From: abdellatif.elkhlifi@arm.com To: u-boot@lists.denx.de Cc: sudeep.holla@arm.com, abdellatif.elkhlifi@arm.com, achin.gupta@arm.com, ilias.apalodimas@linaro.org, robh@kernel.org, sjg@chromium.org, trini@konsulko.com, vishnu.banavath@arm.com, xueliang.zhong@arm.com, nd@arm.com Subject: [PATCH v2 5/6] arm_ffa: introduce armffa command Sandbox test Date: Fri, 15 Apr 2022 13:28:02 +0100 Message-Id: <20220415122803.16666-6-abdellatif.elkhlifi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220415122803.16666-1-abdellatif.elkhlifi@arm.com> References: <20220413172943.rvvxrsl5ukxy7xkg@bogus> <20220415122803.16666-1-abdellatif.elkhlifi@arm.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean From: Abdellatif El Khlifi Add Sandbox test for the armffa command Signed-off-by: Abdellatif El Khlifi --- MAINTAINERS | 2 ++ test/cmd/Makefile | 1 + test/cmd/armffa.c | 33 +++++++++++++++++++++++++++++++++ test/cmd/armffa.h | 13 +++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 test/cmd/armffa.c create mode 100644 test/cmd/armffa.h diff --git a/MAINTAINERS b/MAINTAINERS index 74b7ed9388..eb9c3886e6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -242,6 +242,8 @@ F: include/arm_ffa_helper.h F: include/sandbox_arm_ffa.h F: include/sandbox_arm_ffa_helper.h F: lib/arm-ffa/ +F: test/cmd/armffa.c +F: test/cmd/armffa.h F: test/dm/ffa.c F: test/dm/ffa.h diff --git a/test/cmd/Makefile b/test/cmd/Makefile index a59adb1e6d..d9dc0809d6 100644 --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@ -11,3 +11,4 @@ obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o obj-$(CONFIG_CMD_PINMUX) += pinmux.o obj-$(CONFIG_CMD_PWM) += pwm.o obj-$(CONFIG_CMD_SETEXPR) += setexpr.o +obj-$(CONFIG_SANDBOX_FFA) += armffa.o diff --git a/test/cmd/armffa.c b/test/cmd/armffa.c new file mode 100644 index 0000000000..fc41571cf0 --- /dev/null +++ b/test/cmd/armffa.c @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Test for armffa command + * + * (C) Copyright 2022 ARM Limited + * Abdellatif El Khlifi + */ + +#include "armffa.h" +#include +#include +#include +#include +#include + +/* Basic test of 'armffa' command */ +static int dm_test_armffa_cmd(struct unit_test_state *uts) +{ + ut_assertok(ffa_helper_bus_discover()); + + /* armffa getpart */ + ut_assertok(run_command("armffa getpart " SE_PROXY_PARTITION_UUID, 0)); + + /* armffa ping */ + ut_assertok(run_command("armffa ping " SE_PROXY_PARTITION_ID, 0)); + + /* armffa devlist */ + ut_assertok(run_command("armffa devlist", 0)); + + return CMD_RET_SUCCESS; +} + +DM_TEST(dm_test_armffa_cmd, UT_TESTF_SCAN_FDT | UT_TESTF_CONSOLE_REC); diff --git a/test/cmd/armffa.h b/test/cmd/armffa.h new file mode 100644 index 0000000000..630dc75e25 --- /dev/null +++ b/test/cmd/armffa.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2022 ARM Limited + * Abdellatif El Khlifi + */ + +#ifndef __TEST_CMD_FFA_H +#define __TEST_CMD_FFA_H + +#define SE_PROXY_PARTITION_ID "0x1245" +#define SE_PROXY_PARTITION_UUID "33d532ed-e699-0942-c09c-a798d9cd722d" + +#endif /*__TEST_CMD_FFA_H */ -- 2.17.1