Skip to content

Commit db4f792

Browse files
committed
8349348: Refactor ClassLoaderDeadlock.sh and Deadlock.sh to run fully in java
Backport-of: 32d6d031514be9cfee5b0fd778cb738b7ff9d770
1 parent 75b03d8 commit db4f792

File tree

4 files changed

+17
-177
lines changed

4 files changed

+17
-177
lines changed

test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,14 @@
2121
* questions.
2222
*/
2323

24-
// See bug 5094825 / ClassLoadDeadlock.sh
24+
/*
25+
* @test
26+
* @bug 5094825
27+
* @summary verify no deadlock if crypto provider in other classloader is used to verify signed jars
28+
* @library ./Deadlock.jar
29+
* @compile provider/HashProvider.java
30+
* @run main/othervm/timeout=30 ClassLoaderDeadlock
31+
*/
2532

2633
import java.net.*;
2734

test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh

Lines changed: 0 additions & 106 deletions
This file was deleted.

test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,13 @@
2121
* questions.
2222
*/
2323

24-
25-
// see Deadlock.sh
24+
/*
25+
* @test
26+
* @bug 4944382
27+
* @summary make sure we do not deadlock loading signed JAR with getInstance()
28+
* @library ./Deadlock.jar
29+
* @run main/othervm/timeout=30 Deadlock
30+
*/
2631

2732
import java.security.*;
2833

test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)