Details
-
Bug
-
Resolution: Fixed
-
P4
-
23
-
b10
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8327199 | 22.0.2 | Sonia Zaldana Calles | P4 | Resolved | Fixed | b01 |
JDK-8327163 | 21.0.4-oracle | PAWAN CHAWDHARY | P4 | Resolved | Fixed | b01 |
JDK-8329239 | 21.0.4 | Andrew Lu | P4 | Resolved | Fixed | b01 |
JDK-8327162 | 17.0.12-oracle | PAWAN CHAWDHARY | P4 | Resolved | Fixed | b01 |
JDK-8329236 | 17.0.12 | Andrew Lu | P4 | Resolved | Fixed | b01 |
JDK-8329722 | 11.0.24 | Andrew Lu | P4 | Resolved | Fixed | b01 |
Description
When gtests fail multiple/many times within the same test (that can happen if e.g. EXPECT or ASSERT are used in nested sub routines, since ASSERT only cancels the outermost subroutine, and EXPECT does nothing at all, only prints the message), the test logs produced by the jtreg gtest runner get flooded with endlessly repeated test names. This is especially annoying in GHA logs.
Example: the following code:
```
static void testtesttest2 () {
for (int i = 0; i < 100; i++) {
EXPECT_TRUE(false);
}
}
static void testtesttest () {
testtesttest2();
}
TEST_VM(os, xtesttestttest) {
testtesttest();
}
```
produces this output where the failing test name is repeated for every error:
```
description=file\:/shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/gtest/GTestWrapper.java
elapsed=60516 0\:01\:00.516
end=Wed Jan 17 14\:11\:52 CET 2024
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.lang.AssertionError\: gtest execution failed; exit code \= 2. the failed tests\: [os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm, os\:\:xtesttestttest_vm]
```
I would like it to print the failing test just once.
Attachments
Issue Links
- backported by
-
JDK-8327162 gtest runner repeats test name for every single gtest assertion
- Resolved
-
JDK-8327163 gtest runner repeats test name for every single gtest assertion
- Resolved
-
JDK-8327199 gtest runner repeats test name for every single gtest assertion
- Resolved
-
JDK-8329236 gtest runner repeats test name for every single gtest assertion
- Resolved
-
JDK-8329239 gtest runner repeats test name for every single gtest assertion
- Resolved
-
JDK-8329722 gtest runner repeats test name for every single gtest assertion
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/2f285fd9
-
Commit openjdk/jdk17u-dev/b2938564
-
Commit openjdk/jdk21u-dev/0bfb53c8
-
Commit openjdk/jdk/1aae980c
-
Review openjdk/jdk11u-dev/2633
-
Review openjdk/jdk17u-dev/2336
-
Review openjdk/jdk21u-dev/412
-
Review openjdk/jdk/17489