From 034297a6bd9bfcea7fa48792f54c84a6e976b319 Mon Sep 17 00:00:00 2001 From: Fernando Guallini Date: Fri, 26 Jul 2024 18:51:12 +0000 Subject: [PATCH] 8336240: Test com/sun/crypto/provider/Cipher/DES/PerformanceTest.java fails with java.lang.ArithmeticException Reviewed-by: wetmore --- test/jdk/ProblemList.txt | 1 - test/jdk/TEST.groups | 1 - .../provider/Cipher/DES/PerformanceTest.java | 19 +++++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index 05e42b49330..8e627e27d7a 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -606,7 +606,6 @@ sun/security/smartcardio/TestExclusive.java 8039280 generic- sun/security/smartcardio/TestMultiplePresent.java 8039280 generic-all sun/security/smartcardio/TestPresent.java 8039280 generic-all sun/security/smartcardio/TestTransmit.java 8039280 generic-all -com/sun/crypto/provider/Cipher/DES/PerformanceTest.java 8039280 generic-all com/sun/security/auth/callback/TextCallbackHandler/Password.java 8039280 generic-all com/sun/security/sasl/gsskerb/AuthOnly.java 8039280 generic-all com/sun/security/sasl/gsskerb/ConfSecurityLayer.java 8039280 generic-all diff --git a/test/jdk/TEST.groups b/test/jdk/TEST.groups index 6a5be3736e8..55ae0e9c67b 100644 --- a/test/jdk/TEST.groups +++ b/test/jdk/TEST.groups @@ -621,7 +621,6 @@ jdk_core_manual_no_input = \ jdk_security_manual_no_input = \ :jdk_security_infra \ - com/sun/crypto/provider/Cipher/DES/PerformanceTest.java \ com/sun/crypto/provider/Cipher/AEAD/GCMIncrementByte4.java \ com/sun/crypto/provider/Cipher/AEAD/GCMIncrementDirect4.java \ com/sun/security/auth/callback/TextCallbackHandler/Password.java \ diff --git a/test/jdk/com/sun/crypto/provider/Cipher/DES/PerformanceTest.java b/test/jdk/com/sun/crypto/provider/Cipher/DES/PerformanceTest.java index 698acd083b4..33167cafbd9 100644 --- a/test/jdk/com/sun/crypto/provider/Cipher/DES/PerformanceTest.java +++ b/test/jdk/com/sun/crypto/provider/Cipher/DES/PerformanceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2024, 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 @@ -26,11 +26,8 @@ * @bug 0000000 * @summary This test checks performance of various ciphers. * @author Jan Luehe - * @run main/manual PerformanceTest */ -import java.security.*; import java.security.spec.*; -import java.io.*; import javax.crypto.*; import javax.crypto.spec.*; @@ -178,14 +175,16 @@ public class PerformanceTest { long start, end; cipher.init(Cipher.ENCRYPT_MODE, cipherKey, params); - start = System.currentTimeMillis(); + start = getTimeInMicroseconds(); for (int i=0; i