Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/TestDescription.java
40951 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/jvmti/DataDumpRequest/datadumpreq001.
29
* VM Testbase keywords: [jpda, jvmti, noras]
30
* VM Testbase readme:
31
* DESCRIPTION
32
* This test exercises the JVMTI event DataDumpRequest.
33
* It verifies that the event will be sent only during the live phase of
34
* VM execution.
35
* The test works as follows. The agent enables the DataDumpRequest
36
* event on 'OnLoad' phase. Then the java part run a special perl script
37
* 'datadumpreq001.pl' in a separate child process. The script obtains PID
38
* of its parent process and sends it the signal QUIT (CTRL-\). If the
39
* DataDumpRequest was not send and/or the script failed, the test ignores
40
* it and passes. Otherwise, the VM phase is checked during the
41
* DataDumpRequest callback.
42
* COMMENTS
43
* Note that obtained PID mentioned above may not belong to the java
44
* process itself in non-HotSpot VMs. It may happen if VM runs child
45
* process indirectly via a separate shell.
46
* Besides that, sending CTRL-\ causes the HotSpot VM itself to print its
47
* full thread dump. The dump may be ignored.
48
*
49
* The test has been fixed due to the bug 4947594.
50
*
51
* @library /vmTestbase
52
* /test/lib
53
* @build nsk.jvmti.DataDumpRequest.datadumpreq001
54
* @run main/othervm/native
55
* -agentlib:datadumpreq001=-waittime=5,-verbose=
56
* nsk.jvmti.DataDumpRequest.datadumpreq001
57
*/
58
59
60