1 /*
   2  * Copyright (c) 2017, 2018, 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/jdwp/VirtualMachine/Resume/resume001.
  29  * VM Testbase keywords: [quick, jpda, jdwp]
  30  * VM Testbase readme:
  31  * DESCRIPTION
  32  *     This test performs checking for
  33  *         command set: VirtualMachine
  34  *         command: Resume
  35  *     Test checks that debugee accept command and replies
  36  *     with correct reply packet. Also test checks that
  37  *     debugee is actually resumed by the command.
  38  *     First, test launches debuggee VM using support classes
  39  *     and connects to it. Debugee is launched in the suspend
  40  *     mode by default.
  41  *     Then test sends Resume command and waits for a
  42  *     reply packet.
  43  *     When reply is received test checks if the reply packet
  44  *     has proper structure. Then test waits for a signal
  45  *     from the resumed debuggee. If signal has not received
  46  *     after specified by WAITTIME timeout, test complains
  47  *     about an error.
  48  *     Finally, test sends debugee VM signal to quit, waits
  49  *     for debugee VM exits and exits too with a proper exit code.
  50  *
  51  * @library /vmTestbase /test/hotspot/jtreg/vmTestbase
  52  *          /test/lib
  53  * @run driver jdk.test.lib.FileInstaller . .
  54  * @build nsk.jdwp.VirtualMachine.Resume.resume001
  55  *        nsk.jdwp.VirtualMachine.Resume.resume001a
  56  * @run main/othervm PropertyResolvingWrapper
  57  *      nsk.jdwp.VirtualMachine.Resume.resume001
  58  *      -arch=${os.family}-${os.simpleArch}
  59  *      -verbose
  60  *      -waittime=5
  61  *      -debugee.vmkind=java
  62  *      -transport.address=dynamic
  63  *      -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
  64  */
  65