Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8251998: remove usage of PropertyResolvingWrapper in vmTestbase/jit/t
Browse files Browse the repository at this point in the history
Reviewed-by: kvn
  • Loading branch information
iignatev committed Aug 22, 2020
1 parent ac4a6c9 commit b223700
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 65 deletions.
2 changes: 0 additions & 2 deletions test/hotspot/jtreg/vmTestbase/jit/t/TEST.properties

This file was deleted.

52 changes: 22 additions & 30 deletions test/hotspot/jtreg/vmTestbase/jit/t/t087/t087.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2020, 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
Expand Down Expand Up @@ -37,64 +37,56 @@
*
* @comment make sure foo.class is only in the current directory
* @clean jit.t.t087.foo
* @run driver PropertyResolvingWrapper ExecDriver --cmd
* @run driver ExecDriver --cmd
* ${compile.jdk}/bin/javac
* -d .
* -cp ${test.class.path}
* ${test.src}/t087.java
*
* @comment run the test
* @run driver PropertyResolvingWrapper ExecDriver --java
* @run driver ExecDriver --java
* -cp .${path.separator}${test.class.path}
* jit.t.t087.t087
* -WorkDir ./jit/t/t087
*/

package jit.t.t087;

import java.io.File;
import nsk.share.TestFailure;
import nsk.share.GoldChecker;

class foo
{
static void bar()
{
import java.io.File;

class foo {
static void bar() {
t087.goldChecker.println("You shouldn't see this.");
}
}

class t087
{
public static final GoldChecker goldChecker = new GoldChecker( "t087" );
class t087 {
public static final GoldChecker goldChecker = new GoldChecker("t087");

public static void main(String[] argv)
{
public static void main(String[] argv) {
File f;
if (argv.length < 2 || !argv[0].equals("-WorkDir"))
f = new File(".", "foo.class");
else
f = new File(argv[1], "foo.class");
if(f.isFile())
{

if (argv.length < 2 || !argv[0].equals("-WorkDir")) {
f = new File(".", "foo.class");
} else {
f = new File(argv[1], "foo.class");
}
if (f.isFile()) {
f.delete();

for(int i = 1; i <= 2; i += 1)
{
try
{
for (int i = 1; i <= 2; i += 1) {
try {
foo.bar();
}
catch(Throwable t)
{
} catch (Throwable t) {
t087.goldChecker.println("Exception on try" + i);
}
}

}
else
} else {
t087.goldChecker.println("No foo.class in cwd");
}
t087.goldChecker.check();
}
}

56 changes: 23 additions & 33 deletions test/hotspot/jtreg/vmTestbase/jit/t/t088/t088.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2020, 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
Expand Down Expand Up @@ -37,14 +37,14 @@
*
* @comment make sure foo.class is only in the current directory
* @clean jit.t.t088.foo
* @run driver PropertyResolvingWrapper ExecDriver --cmd
* @run driver ExecDriver --cmd
* ${compile.jdk}/bin/javac
* -d .
* -cp ${test.class.path}
* ${test.src}/t088.java
*
* @comment run the test
* @run driver PropertyResolvingWrapper ExecDriver --java
* @run driver ExecDriver --java
* -cp .${path.separator}${test.class.path}
* jit.t.t088.t088
* -WorkDir ./jit/t/t088
Expand All @@ -55,55 +55,45 @@
// Just like the one before except that the two patched calls
// are attempted from distinct call sites.

import java.io.File;
import nsk.share.TestFailure;
import nsk.share.GoldChecker;

class foo
{
static void bar()
{
import java.io.File;

class foo {
static void bar() {
t088.goldChecker.println("You shouldn't see this.");
}
}

class t088
{
public static final GoldChecker goldChecker = new GoldChecker( "t088" );
class t088 {
public static final GoldChecker goldChecker = new GoldChecker("t088");

public static void main(String[] argv)
{
public static void main(String[] argv) {
File f;
if (argv.length < 2 || !argv[0].equals("-WorkDir"))
f = new File(".", "foo.class");
else
f = new File(argv[1], "foo.class");
if(f.isFile())
{

if (argv.length < 2 || !argv[0].equals("-WorkDir")) {
f = new File(".", "foo.class");
} else {
f = new File(argv[1], "foo.class");
}
if (f.isFile()) {
f.delete();

try
{
try {
foo.bar();
}
catch(Throwable t)
{
} catch (Throwable t) {
t088.goldChecker.println("Exception on first try");
}

try
{
try {
foo.bar();
}
catch(Throwable t)
{
} catch (Throwable t) {
t088.goldChecker.println("Exception on second try");
}

}
else
} else {
t088.goldChecker.println("No foo.class in cwd");
}
t088.goldChecker.check();
}
}

0 comments on commit b223700

Please sign in to comment.