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 * @test
26 * @bug 4146462
27 * @summary Priority inversion prevents call to the genSeed method from
28 * returning
29 *
30 * if the test returns, then it passed.
31 * if the test never returns (hangs forever), then it failed.
32 */
33
34 import java.security.SecureRandom;
35
36 public class Priority_Inversion {
37 public static void main(String args[]) {
38 int deltaPriority = 1;
39
40 if (args.length == 1) {
41 try {
42 deltaPriority = Integer.parseInt(args[0]);
43 }
44 catch (NumberFormatException nfe) {
45 System.err.println
46 ("Sorry, \"" + args[0] + "\" is not a number");
47 System.exit(1);
48 }
49 }
50
51 RandomTest rand = new RandomTest();
|
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 * @test
26 * @bug 4146462
27 * @summary Priority inversion prevents call to the genSeed method from
28 * returning
29 *
30 * if the test returns, then it passed.
31 * if the test never returns (hangs forever), then it failed.
32 * @key randomness
33 */
34
35 import java.security.SecureRandom;
36
37 public class Priority_Inversion {
38 public static void main(String args[]) {
39 int deltaPriority = 1;
40
41 if (args.length == 1) {
42 try {
43 deltaPriority = Integer.parseInt(args[0]);
44 }
45 catch (NumberFormatException nfe) {
46 System.err.println
47 ("Sorry, \"" + args[0] + "\" is not a number");
48 System.exit(1);
49 }
50 }
51
52 RandomTest rand = new RandomTest();
|