1use std::sync::OnceLock;
3
4use libtest_mimic::Trial;
5
6use crate::suite::{TestSuite, TestSystemState};
7use seabee::config::Config;
8
9mod files;
10mod kmod;
11mod maps;
12mod pins;
13mod ptrace;
14mod signal;
15mod uprobe;
16
17pub static TEST_SYSTEM_STATE: OnceLock<TestSystemState> = OnceLock::new();
18pub static CONFIG: OnceLock<Config> = OnceLock::new();
19
20pub struct SeaBeeSecurityTestSuite;
21
22impl TestSuite for SeaBeeSecurityTestSuite {
23 type CustomTestState = Config;
24
25 fn custom_state() -> &'static OnceLock<Self::CustomTestState> {
26 &CONFIG
27 }
28
29 fn system_state() -> &'static OnceLock<TestSystemState> {
30 &TEST_SYSTEM_STATE
31 }
32
33 fn tests() -> Vec<Trial> {
34 let mut tests = Vec::new();
35 tests.extend(files::tests());
36 tests.extend(kmod::tests());
37 tests.extend(maps::tests());
38 tests.extend(pins::tests());
39 tests.extend(ptrace::tests());
40 tests.extend(signal::tests());
41 tests.extend(uprobe::tests());
42 tests
43 }
44}