2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26
27 #ifndef PRODUCT
28
29 #include "utilities/internalVMTests.hpp"
30 #include "utilities/macros.hpp"
31 #include "utilities/ostream.hpp"
32
33 #define run_unit_test(unit_test_function_call) \
34 void unit_test_function_call(); \
35 run_test(#unit_test_function_call, unit_test_function_call);
36
37 void InternalVMTests::run_test(const char* name, void (*test)()) {
38 tty->print_cr("Running test: %s", name);
39 test();
40 }
41
42 void InternalVMTests::run() {
81 run_unit_test(Test_logtagset_descriptions);
82 run_unit_test(Test_log_file_startup_rotation);
83 run_unit_test(Test_log_file_startup_truncation);
84 run_unit_test(Test_invalid_log_file);
85 run_unit_test(Test_multiline_logging);
86 run_unit_test(DirectivesParser_test);
87 run_unit_test(Test_TempNewSymbol);
88 #if INCLUDE_VM_STRUCTS
89 run_unit_test(VMStructs_test);
90 #endif
91 #if INCLUDE_ALL_GCS
92 run_unit_test(TestOldFreeSpaceCalculation_test);
93 run_unit_test(TestG1BiasedArray_test);
94 run_unit_test(TestBufferingOopClosure_test);
95 run_unit_test(TestCodeCacheRemSet_test);
96 if (UseG1GC) {
97 run_unit_test(FreeRegionList_test);
98 run_unit_test(IHOP_test);
99 }
100 run_unit_test(test_memset_with_concurrent_readers);
101 run_unit_test(TestPredictions_test);
102 run_unit_test(WorkerDataArray_test);
103 run_unit_test(ParallelCompact_test);
104 #endif
105 tty->print_cr("All internal VM tests passed");
106 }
107
108 #endif
|
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 #include "precompiled.hpp"
25
26 #ifndef PRODUCT
27
28 #include "utilities/internalVMTests.hpp"
29 #include "utilities/macros.hpp"
30 #include "utilities/ostream.hpp"
31
32 #define run_unit_test(unit_test_function_call) \
33 void unit_test_function_call(); \
34 run_test(#unit_test_function_call, unit_test_function_call);
35
36 void InternalVMTests::run_test(const char* name, void (*test)()) {
37 tty->print_cr("Running test: %s", name);
38 test();
39 }
40
41 void InternalVMTests::run() {
80 run_unit_test(Test_logtagset_descriptions);
81 run_unit_test(Test_log_file_startup_rotation);
82 run_unit_test(Test_log_file_startup_truncation);
83 run_unit_test(Test_invalid_log_file);
84 run_unit_test(Test_multiline_logging);
85 run_unit_test(DirectivesParser_test);
86 run_unit_test(Test_TempNewSymbol);
87 #if INCLUDE_VM_STRUCTS
88 run_unit_test(VMStructs_test);
89 #endif
90 #if INCLUDE_ALL_GCS
91 run_unit_test(TestOldFreeSpaceCalculation_test);
92 run_unit_test(TestG1BiasedArray_test);
93 run_unit_test(TestBufferingOopClosure_test);
94 run_unit_test(TestCodeCacheRemSet_test);
95 if (UseG1GC) {
96 run_unit_test(FreeRegionList_test);
97 run_unit_test(IHOP_test);
98 }
99 run_unit_test(test_memset_with_concurrent_readers);
100 run_unit_test(WorkerDataArray_test);
101 run_unit_test(ParallelCompact_test);
102 #endif
103 tty->print_cr("All internal VM tests passed");
104 }
105
106 #endif
|