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 #include "logTestUtils.inline.hpp"
26 #include "logging/logFileOutput.hpp"
27 #include "memory/resourceArea.hpp"
28 #include "prims/jvm.h"
29 #include "runtime/os.hpp"
30 #include "unittest.hpp"
31 #include "utilities/globalDefinitions.hpp"
32 #include "utilities/ostream.hpp"
33
34 static const char* name = "file=testlog.pid%p.%t.log";
35
36 // Test parsing a bunch of valid file output options
37 TEST_VM(LogFileOutput, parse_valid) {
38 const char* valid_options[] = {
39 "", "filecount=10", "filesize=512",
40 "filecount=11,filesize=256",
41 "filesize=256,filecount=11",
42 "filesize=0", "filecount=1",
43 "filesize=1m", "filesize=1M",
44 "filesize=1k", "filesize=1G"
45 };
46
47 // Override LogOutput's vm_start time to get predictable file name
48 LogFileOutput::set_file_name_parameters(0);
|
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 #include "jvm.h"
26 #include "logTestUtils.inline.hpp"
27 #include "logging/logFileOutput.hpp"
28 #include "memory/resourceArea.hpp"
29 #include "runtime/os.hpp"
30 #include "unittest.hpp"
31 #include "utilities/globalDefinitions.hpp"
32 #include "utilities/ostream.hpp"
33
34 static const char* name = "file=testlog.pid%p.%t.log";
35
36 // Test parsing a bunch of valid file output options
37 TEST_VM(LogFileOutput, parse_valid) {
38 const char* valid_options[] = {
39 "", "filecount=10", "filesize=512",
40 "filecount=11,filesize=256",
41 "filesize=256,filecount=11",
42 "filesize=0", "filecount=1",
43 "filesize=1m", "filesize=1M",
44 "filesize=1k", "filesize=1G"
45 };
46
47 // Override LogOutput's vm_start time to get predictable file name
48 LogFileOutput::set_file_name_parameters(0);
|