Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion host/xtest/ffa_spmc_1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ static const char test_endpoint2_uuid[] =
"7817164c-c40c-4d1a-867a-9bb2278cf41a";
static const char test_endpoint3_uuid[] =
"23eb0100-e32a-4497-9052-2f11e584afa6";
static const char test_lsp_endpoint_uuid[] =
"54b5440e-a3d2-48d1-872a-7b6cbfc34855";

static struct ffa_ioctl_ep_desc test_endpoint1 = {
.uuid_ptr = (uint64_t)test_endpoint1_uuid,
Expand All @@ -66,6 +68,10 @@ static struct ffa_ioctl_ep_desc test_endpoint3 = {
.uuid_ptr = (uint64_t)test_endpoint3_uuid,
};

static struct ffa_ioctl_ep_desc test_lsp_endpoint = {
.uuid_ptr = (uint64_t)test_lsp_endpoint_uuid,
};

static bool check_ffa_user_version(void)
{
FILE *f = NULL;
Expand Down Expand Up @@ -530,5 +536,37 @@ static void xtest_ffa_spmc_test_1005(ADBG_Case_t *c)
close_debugfs();
}

ADBG_CASE_DEFINE(regression, 1005, xtest_ffa_spmc_test_1005,
ADBG_CASE_DEFINE(ffa_spmc, 1005, xtest_ffa_spmc_test_1005,
"Test FF-A memory: multiple receiver");

static void xtest_ffa_spmc_test_1006(ADBG_Case_t *c)
{
struct ffa_ioctl_msg_args args = { .args = {0, 1, 2, 3, 4 }};
uint16_t ep = 0;
int rc = 0;

if (!init_sp_xtest(c)) {
Do_ADBG_Log("Failed to initialise test, skipping SP test");
goto out;
}

ep = get_endpoint_id(test_lsp_endpoint.uuid_ptr);
if (ep == INCORRECT_ENDPOINT_ID) {
Do_ADBG_Log("Could not contact LSP, skipping LSP test");
goto out;
}

Do_ADBG_BeginSubCase(c, "LSP direct request/response");
args.dst_id = ep;
rc = ioctl(ffa_fd, FFA_IOC_MSG_SEND, &args);
if (!ADBG_EXPECT_COMPARE_SIGNED(c, rc, ==, 0))
goto out;

if (!ADBG_EXPECT_COMPARE_UNSIGNED(c, args.args[0], ==, 10))
goto out;
Do_ADBG_EndSubCase(c, "LSP direct request/response");

out:
close_debugfs();
}
ADBG_CASE_DEFINE(ffa_spmc, 1006, xtest_ffa_spmc_test_1006, "Test FF-A LSP")