Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8048892: TEST_BUG: shell script tests need to be change to not use retired @debuggeeVMOptions mechanism #493

Open
wants to merge 1 commit into
base: pr/492
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions jdk/test/com/sun/jdi/PrivateTransportTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,7 @@ fi
echo "JDK under test is: $TESTJAVA"

# Get flags being sent to debuggee
DEBUGGEEFLAGS=
if [ -r $TESTCLASSES/@debuggeeVMOptions ] ; then
DEBUGGEEFLAGS=`cat $TESTCLASSES/@debuggeeVMOptions`
elif [ -r $TESTCLASSES/../@debuggeeVMOptions ] ; then
DEBUGGEEFLAGS=`cat $TESTCLASSES/../@debuggeeVMOptions`
fi
DEBUGGEEFLAGS=$TESTVMOPTS $TESTJAVAOPTS

# Figure out what the libarch path is
os=`uname -s`
Expand Down
9 changes: 2 additions & 7 deletions jdk/test/com/sun/jdi/ShellScaffold.sh
Original file line number Diff line number Diff line change
Expand Up @@ -836,15 +836,10 @@ startJdb()

startDebuggee()
{
args=
# Note that @debuggeeVMOptions is unique to a test run instead of
# a test in a run. It is not modified during a test run.
if [ -r $TESTCLASSES/../@debuggeeVMOptions ] ; then
args=`cat $TESTCLASSES/../@debuggeeVMOptions`
fi
args=$TESTVMOPTS $TESTJAVAOPTS

if [ ! -z "$args" ] ; then
echo "--Starting debuggee with args from @debuggeeVMOptions: $args"
echo "--Starting debuggee with args from TESTVMOPTS and/or TESTJAVAOPTS: $args"
else
echo "--Starting debuggee"
fi
Expand Down
48 changes: 48 additions & 0 deletions jdk/test/com/sun/jdi/SuspendNoFlagTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

import jdk.testlibrary.OutputAnalyzer;
import jdk.testlibrary.ProcessTools;

/* @test
* @bug 4914611
* @summary Test for JDWP: -agentlib:jdwp=suspend=n hanging
* @library /lib/testlibrary
* @build jdk.testlibrary.*
* @compile -g HelloWorld.java
* @run driver SuspendNoFlagTest
*/
public class SuspendNoFlagTest {

private static final String TEST_CLASSES = System.getProperty(
"test.classes", ".");

public static void main(String[] args) throws Throwable {
OutputAnalyzer output = ProcessTools.executeTestJvm("-classpath",
TEST_CLASSES,
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n",
"HelloWorld");
output.shouldHaveExitValue(0);
}

}
104 changes: 0 additions & 104 deletions jdk/test/com/sun/jdi/SuspendNoFlagTest.sh

This file was deleted.

3 changes: 1 addition & 2 deletions jdk/test/com/sun/jdi/VMConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ class VMConnection {
/**
* Return a String containing VM Options to pass to the debugee
* or an empty string if there are none.
* These are read from the first non-comment line
* in file @debuggeeVMOptions in the test.classes dir
* These are read from TESTVMOPTS and/or TESTJAVAOPTS.
*/
static public String getDebuggeeVMOptions() {
String retVal = "";
Expand Down