Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdb/classpath/classpath001/classpath001.java
40951 views
1
/*
2
* Copyright (c) 2002, 2020, 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
/*
26
* @test
27
*
28
* @summary converted from VM Testbase nsk/jdb/classpath/classpath001.
29
* VM Testbase keywords: [jpda, jdb]
30
* VM Testbase readme:
31
* DECSRIPTION
32
* An "is it alive & breathing" test for the 'classpath' command.
33
* The test passes if reply on 'classpath' command is not empty.
34
* COMMENTS
35
*
36
* @library /vmTestbase
37
* /test/lib
38
* @build nsk.jdb.classpath.classpath001.classpath001a
39
* @run main/othervm
40
* nsk.jdb.classpath.classpath001.classpath001
41
* -arch=${os.family}-${os.simpleArch}
42
* -waittime=5
43
* -debugee.vmkind=java
44
* -transport.address=dynamic
45
* -jdb=${test.jdk}/bin/jdb
46
* -java.options="${test.vm.opts} ${test.java.opts}"
47
* -workdir=.
48
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
49
*/
50
51
package nsk.jdb.classpath.classpath001;
52
53
import nsk.share.*;
54
import nsk.share.jdb.*;
55
56
import java.io.*;
57
import java.util.*;
58
59
public class classpath001 extends JdbTest {
60
61
public static void main (String argv[]) {
62
System.exit(run(argv, System.out) + JCK_STATUS_BASE);
63
}
64
65
public static int run(String argv[], PrintStream out) {
66
debuggeeClass = DEBUGGEE_CLASS;
67
firstBreak = FIRST_BREAK;
68
lastBreak = LAST_BREAK;
69
return new classpath001().runTest(argv, out);
70
}
71
72
static final String PACKAGE_NAME = "nsk.jdb.classpath.classpath001";
73
static final String TEST_CLASS = PACKAGE_NAME + ".classpath001";
74
static final String DEBUGGEE_CLASS = TEST_CLASS + "a";
75
static final String FIRST_BREAK = DEBUGGEE_CLASS + ".main";
76
static final String LAST_BREAK = DEBUGGEE_CLASS + ".lastBreak";
77
78
protected void runCases() {
79
String[] reply;
80
Paragrep grep;
81
int count;
82
Vector v;
83
String found;
84
85
reply = jdb.receiveReplyFor(JdbCommand.classpath);
86
87
grep = new Paragrep(reply);
88
found = grep.findFirst("lasspath");
89
if (found.length() == 0) {
90
log.complain("Failed to report classpath");
91
success = false;
92
}
93
94
jdb.contToExit(1);
95
}
96
}
97
98