test.cpp
Go to the documentation of this file.
1 //
2 // Bareflank Hypervisor
3 //
4 // Copyright (C) 2015 Assured Information Security, Inc.
5 // Author: Rian Quinn <quinnr@ainfosec.com>
6 // Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #include <test.h>
23 #include <new_delete.h>
24 
26 {
27 }
28 
29 bool
31 {
32  return true;
33 }
34 
35 bool
37 {
38  return true;
39 }
40 
41 bool
43 {
44  this->test_start_success();
45  this->test_start_start_twice();
46  this->test_start_execute_vmxon_already_on_failure();
47  this->test_start_execute_vmxon_failure();
48  this->test_start_check_ia32_vmx_cr4_fixed0_msr_failure();
49  this->test_start_check_ia32_vmx_cr4_fixed1_msr_failure();
50  this->test_start_enable_vmx_operation_failure();
51  this->test_start_v8086_disabled_failure();
52  this->test_start_check_ia32_feature_control_msr_lock_bit_clear();
53  this->test_start_check_ia32_feature_control_msr_lock_bit_set();
54  this->test_start_check_ia32_vmx_cr0_fixed0_msr();
55  this->test_start_check_ia32_vmx_cr0_fixed1_msr();
56  this->test_start_check_vmx_capabilities_msr_memtype_failure();
57  this->test_start_check_vmx_capabilities_msr_addr_width_failure();
58  this->test_start_check_vmx_capabilities_true_based_controls_failure();
59  this->test_start_check_cpuid_vmx_supported_failure();
60  this->test_start_virt_to_phys_failure();
61  this->test_stop_success();
62  this->test_stop_stop_twice();
63  this->test_stop_vmxoff_check_failure();
64  this->test_stop_vmxoff_failure();
65 
66  return true;
67 }
68 
69 int
70 main(int argc, char *argv[])
71 {
72  return RUN_ALL_TESTS(vmxon_ut);
73 }
bool init() override
Definition: test.cpp:30
int main(int argc, char *argv[])
Definition: test.cpp:221
Definition: test.h:27
bool fini() override
Definition: test.cpp:36
#define RUN_ALL_TESTS(ut)
Definition: unittest.h:246
vmxon_ut()
Definition: test.cpp:25
bool list() override
Definition: test.cpp:42