Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x002/TestDescription.java
41893 views
1
/*
2
* Copyright (c) 2018, 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/jdi/BScenarios/hotswap/tc04x002.
29
* VM Testbase keywords: [quick, jpda, jdi, redefine]
30
* VM Testbase readme:
31
* DESCRIPTION:
32
* This test is from the group of so-called Borland's scenarios and
33
* implements the following test case:
34
* Suite 3 - Hot Swap
35
* Test case: TC4
36
* Description: Before point of execution, different method
37
* Steps: 1.Set breakpoint at line 30 (call to c()
38
* from b())
39
* 2.Debug Main
40
* 3.Insert as first line in a():
41
* System.err.println("foo");
42
* 4.Smart Swap
43
* 5.Set Smart PopFrame to beginging of
44
* method a()
45
* 6.Resume
46
* X. Prints out "foo" and hits breakpoint
47
* at line 30
48
* 7.Resume
49
* X. Print numbers
50
* The description was drown up according to steps under JBuilder.
51
* Of course, the test has own line numbers and method/class names and
52
* works as follow:
53
* When the test is starting debugee, debugger sets breakpoint at
54
* the 43th line (method "method_B").
55
* After the breakpoint is reached, debugger:
56
* - redefines debugee adding a new line into "method_A",
57
* - pops frames at beginning of "method_A"
58
* - sets breakpoint at the 43th line again
59
* and resumes debugee.
60
* It is expected the new code will be actual after the redefining and
61
* it hits breakpoint.
62
* COMMENTS:
63
* Test was fixed according to test bug:
64
* 4778296 TEST_BUG: debuggee VM intemittently hangs after resuming
65
* - handling VMStartEvent was removed from the debugger part of the test
66
* - quit on VMDeathEvent was added to the event handling loop
67
* Test updated to wait for debugee VM exit:
68
* - standard method Debugee.endDebugee() is used instead of final Debugee.resume()
69
*
70
* @library /vmTestbase
71
* /test/lib
72
* @build nsk.jdi.BScenarios.hotswap.tc04x002
73
* nsk.jdi.BScenarios.hotswap.tc04x002a
74
*
75
* @comment compile newclassXX to bin/newclassXX
76
* with full debug info
77
* @run driver nsk.share.ExtraClassesBuilder
78
* -g:lines,source,vars
79
* newclass
80
*
81
* @run main/othervm
82
* nsk.jdi.BScenarios.hotswap.tc04x002
83
* ./bin
84
* -verbose
85
* -arch=${os.family}-${os.simpleArch}
86
* -waittime=5
87
* -debugee.vmkind=java
88
* -transport.address=dynamic
89
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
90
*/
91
92
93