Skip to content

Commit

Permalink
Add ARM vCPU inject IRQ test
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
  • Loading branch information
Ivan-Velickovic committed Feb 16, 2024
1 parent dae2ff3 commit dd78c16
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions apps/sel4test-tests/src/tests/vcpu.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2023
*
* SPDX-License-Identifier: BSD-2-Clause
*/

/* This file contains tests related to vCPU syscalls. */

#include <stdio.h>
#include <sel4/sel4.h>
#include <sel4test/testutil.h>
#include <sel4test/macros.h>

#include "../helpers.h"

#ifdef CONFIG_ARM_HYPERVISOR_SUPPORT
int test_vcpu_inject_without_tcb(env_t env)
{
vka_object_t vcpu;
int error = vka_alloc_vcpu(&env->vka, &vcpu);

error = seL4_ARM_VCPU_InjectIRQ(vcpu.cptr, 0, 0, 0, 0);
// TODO: check for error
}
DEFINE_TEST(VCPU0001, "Inject IRQ without TCB associated with vCPU", test_vcpu_inject_without_tcb, true)
#endif

0 comments on commit dd78c16

Please sign in to comment.