1#![no_std]
7#![forbid(unsafe_code)]
8
9use bitfield_struct::bitfield;
10use zerocopy::FromBytes;
11use zerocopy::Immutable;
12use zerocopy::IntoBytes;
13use zerocopy::KnownLayout;
14use zerocopy::TryFromBytes;
15
16#[repr(C)]
18#[derive(Debug, IntoBytes, Immutable)]
19pub struct StartInput {
20 pub command: u64,
22 pub test_index: u64,
24}
25
26#[bitfield(u64)]
28#[derive(IntoBytes, Immutable, KnownLayout, FromBytes)]
29pub struct TestFlags64 {
30 #[bits(1)]
31 pub expected_failure: bool,
32 #[bits(1)]
33 pub linux_only: bool,
34 #[bits(62)]
35 reserved: u64,
36}
37
38#[repr(C)]
40#[derive(IntoBytes, FromBytes, Immutable)]
41pub struct TestDescriptor64 {
42 pub name: u64,
44 pub name_len: u64,
46 pub entrypoint: u64,
48 pub flags: TestFlags64,
50}
51
52#[repr(u32)]
54#[derive(TryFromBytes)]
55pub enum Command {
56 Log(StrDescriptor),
58 Panic {
60 message: StrDescriptor,
62 filename: StrDescriptor,
64 line: u32,
66 },
67 Complete {
69 success: bool,
71 },
72}
73
74#[repr(C)]
76#[derive(FromBytes)]
77pub struct StrDescriptor {
78 pub gpa: u64,
80 pub len: u64,
82}