The Pedigree Project 0.1
modules/system/hosted-smoke/main.cc
1/*
2 * Copyright (c) 2026, Pedigree Developers
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted.
6 */
7
8#include "pedigree/kernel/Log.h"
9
10#include "modules/Module.h"
11
12extern void system_reset();
13extern bool runHostedWaitRegressions();
14#if PEDIGREE_AFFINITY_TESTS
15extern bool runAffinityRegressions();
16#endif
17#if PEDIGREE_CHILD_WAIT_TESTS
18extern bool runChildWaitRegressions();
19#endif
20#if PEDIGREE_PTRACE_TESTS
21extern bool runPtraceFrameRegressions();
22#endif
23
24static bool entry() {
25 if (!runHostedWaitRegressions()) {
26 system_reset();
27 return true;
28 }
29#if PEDIGREE_AFFINITY_TESTS
30 if (!runAffinityRegressions()) {
31 system_reset();
32 return true;
33 }
34#endif
35#if PEDIGREE_CHILD_WAIT_TESTS
36 if (!runChildWaitRegressions()) {
37 system_reset();
38 return true;
39 }
40#endif
41#if PEDIGREE_PTRACE_TESTS
42 if (!runPtraceFrameRegressions()) {
43 system_reset();
44 return true;
45 }
46#endif
47
48 NOTICE("HOSTED-SMOKE: populated initrd executed");
49 system_reset();
50 return true;
51}
52
53static void exit() {}
54
55MODULE_INFO("hosted-smoke", &entry, &exit, "config", "fat", "hid", "rawfs", "scsi", "usb",
56 "usb-mass-storage", "vfs");