42 void test_common_init();
44 void test_common_fini_unloaded();
45 void test_common_fini_successful_start();
46 void test_common_fini_successful_load();
47 void test_common_fini_successful_add_module();
48 void test_common_fini_corrupted();
49 void test_common_fini_failed_load();
50 void test_common_fini_failed_start();
51 void test_common_fini_unload_failed();
52 void test_common_fini_stop_failed();
53 void test_common_fini_reset_failed();
55 void test_common_add_module_invalid_file();
56 void test_common_add_module_invalid_file_size();
57 void test_common_add_module_garbage_module();
58 void test_common_add_module_add_when_already_loaded();
59 void test_common_add_module_add_when_already_running();
60 void test_common_add_module_add_when_corrupt();
61 void test_common_add_module_add_too_many();
62 void test_common_add_module_platform_alloc_fails();
63 void test_common_add_module_load_elf_fails();
65 void test_common_load_successful_load();
66 void test_common_load_load_when_already_loaded();
67 void test_common_load_load_when_already_running();
68 void test_common_load_load_when_corrupt();
69 void test_common_load_fail_due_to_relocation_error();
70 void test_common_load_fail_due_to_no_modules_added();
71 void test_common_load_add_md_failed();
72 void test_common_load_add_md_tls_failed();
73 void test_common_load_tls_platform_alloc_failed();
74 void test_common_load_stack_platform_alloc_failed();
75 void test_common_load_loader_add_failed();
76 void test_common_load_resolve_symbol_failed();
77 void test_common_load_execute_symbol_failed();
79 void test_common_unload_unload_when_already_unloaded();
80 void test_common_unload_unload_when_running();
81 void test_common_unload_unload_when_corrupt();
82 void test_common_unload_execute_symbol_failed();
84 void test_common_start_start_when_unloaded();
85 void test_common_start_start_when_already_running();
86 void test_common_start_start_when_corrupt();
87 void test_common_start_start_when_start_vmm_missing();
88 void test_common_start_start_vmm_failure();
89 void test_common_start_set_affinity_failed();
90 void test_common_start_vmcall_failed();
92 void test_common_stop_stop_when_unloaded();
93 void test_common_stop_stop_when_not_running();
94 void test_common_stop_stop_when_alread_stopped();
95 void test_common_stop_stop_when_corrupt();
96 void test_common_stop_stop_vmm_missing();
97 void test_common_stop_stop_vmm_failure();
98 void test_common_stop_set_affinity_failed();
99 void test_common_stop_vmcall_failed();
101 void test_common_dump_invalid_drr();
102 void test_common_dump_invalid_vcpuid();
103 void test_common_dump_dump_when_unloaded();
104 void test_common_dump_dump_when_corrupt();
105 void test_common_dump_dump_when_loaded();
106 void test_common_dump_get_drr_missing();
107 void test_common_dump_get_drr_failure();
109 void test_common_vmcall_invalid_args();
110 void test_common_vmcall_set_affinity_failure();
111 void test_common_vmcall_success();
112 void test_common_vmcall_success_event();
113 void test_common_vmcall_vmcall_when_unloaded();
114 void test_common_vmcall_vmcall_when_corrupt();
115 void test_common_vmcall_vmcall_when_loaded();
117 void test_helper_common_vmm_status();
118 void test_helper_get_file_invalid_index();
119 void test_helper_get_file_success();
120 void test_helper_symbol_length_null_symbol();
121 void test_helper_symbol_length_success();
122 void test_helper_resolve_symbol_invalid_name();
123 void test_helper_resolve_symbol_invalid_sym();
124 void test_helper_resolve_symbol_no_loaded_modules();
125 void test_helper_resolve_symbol_missing_symbol();
126 void test_helper_execute_symbol_invalid_arg();
127 void test_helper_execute_symbol_missing_symbol();
128 void test_helper_execute_symbol_sym_failed();
129 void test_helper_execute_symbol_sym_success();
130 void test_helper_add_md_to_memory_manager_null_module();
131 void test_helper_load_elf_file_null_module();
135 std::unique_ptr<char[]> m_dummy_add_md_failure;
136 std::unique_ptr<char[]> m_dummy_add_md_success;
137 std::unique_ptr<char[]> m_dummy_get_drr_failure;
138 std::unique_ptr<char[]> m_dummy_get_drr_success;
139 std::unique_ptr<char[]> m_dummy_misc;
140 std::unique_ptr<char[]> m_dummy_start_vmm_failure;
141 std::unique_ptr<char[]> m_dummy_start_vmm_success;
142 std::unique_ptr<char[]> m_dummy_stop_vmm_failure;
143 std::unique_ptr<char[]> m_dummy_stop_vmm_success;
145 uint64_t m_dummy_add_md_failure_length;
146 uint64_t m_dummy_add_md_success_length;
147 uint64_t m_dummy_get_drr_failure_length;
148 uint64_t m_dummy_get_drr_success_length;
149 uint64_t m_dummy_misc_length;
150 uint64_t m_dummy_start_vmm_failure_length;
151 uint64_t m_dummy_start_vmm_success_length;
152 uint64_t m_dummy_stop_vmm_failure_length;
153 uint64_t m_dummy_stop_vmm_success_length;
~driver_entry_ut() override=default