diff --git a/test/hotspot/jtreg/gtest/GTestResultParser.java b/test/hotspot/jtreg/gtest/GTestResultParser.java index c30ea63e654..ffa98bf29f2 100644 --- a/test/hotspot/jtreg/gtest/GTestResultParser.java +++ b/test/hotspot/jtreg/gtest/GTestResultParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -57,7 +57,10 @@ public class GTestResultParser { testCase = xmlReader.getAttributeValue("", "name"); break; case "failure": - failedTests.add(testSuite + "::" + testCase); + String failedStr = testSuite + "::" + testCase; + if (!failedTests.contains(failedStr)) { + failedTests.add(failedStr); + } break; default: // ignore