Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parsing of the failed LLVM/Clang Unit test names for the failed log titles. #49

Open
vvereschaka opened this issue Oct 2, 2023 · 2 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@vvereschaka
Copy link
Contributor

vvereschaka commented Oct 2, 2023

When few tests get failed within the single unit test, the buildbot prepares each log with the same title for each failed test (see screenshots below). As example the check step got few failed tests for ADTTests unit test and all of them got the same LLVM-Unit::93 title. The buildbot needs to get a proper test name for the failure log title.

A list of failed unit test logs with the same titles:
llvm-failed-test-logs

A list of real name of the failed unit tests:
llvm-real-failed-test-list

The screenshots are for the following build: https://lab.llvm.org/buildbot/#/builders/86/builds/66095

To reproduce the problem on the builder in case the provided link got expired:

  • open builder UI: https://lab.llvm.org/buildbot/#/builders/86
  • click Force Build button at the top right corner
  • select revision field
  • enter revision: 4ae51570806ba5c5fcabe6d6dcbe52e3a5d5453b
  • specify a clean build
  • click Start Build button
@vvereschaka vvereschaka added the invalid This doesn't seem right label Oct 2, 2023
@slydiman
Copy link
Contributor

The full stdio log explains what happened:

...
PASS: LLVM-Unit :: ADT/./ADTTests.exe/55/93 (53 of 2188)
FAIL: LLVM-Unit :: ADT/./ADTTests.exe/4/93 (54 of 2188)
******************** TEST 'LLVM-Unit :: ADT/./ADTTests.exe/4/93' FAILED ********************
...
 Error msg:
[  DEATH   ] 
********************
PASS: LLVM-Unit :: ADT/./ADTTests.exe/38/93 (55 of 2188)
PASS: LLVM-Unit :: ADT/./ADTTests.exe/64/93 (56 of 2188)
...
PASS: LLVM-Unit :: Analysis/./AnalysisTests.exe/3/85 (112 of 2188)
FAIL: LLVM-Unit :: ADT/./ADTTests.exe/87/93 (113 of 2188)
******************** TEST 'LLVM-Unit :: ADT/./ADTTests.exe/87/93' FAILED ********************
...
 Error msg:
[  DEATH   ] 
********************
PASS: LLVM-Unit :: Analysis/./AnalysisTests.exe/29/85 (114 of 2188)
PASS: LLVM-Unit :: Analysis/./AnalysisTests.exe/30/85 (115 of 2188)
...
PASS: LLVM-Unit :: DebugInfo/DWARF/./DebugInfoDWARFTests.exe/86/87 (608 of 2188)
PASS: LLVM-Unit :: DebugInfo/DWARF/./DebugInfoDWARFTests.exe/84/87 (609 of 2188)
FAIL: LLVM-Unit :: ADT/./ADTTests.exe/90/93 (610 of 2188)
******************** TEST 'LLVM-Unit :: ADT/./ADTTests.exe/90/93' FAILED ********************
...
 Error msg:
[  DEATH   ] 
********************
PASS: LLVM-Unit :: DebugInfo/DWARF/./DebugInfoDWARFTests.exe/82/87 (611 of 2188)
PASS: LLVM-Unit :: DebugInfo/DWARF/./DebugInfoDWARFTests.exe/72/87 (612 of 2188)
...

The log name formatting is the following

name_part = name.rpartition('::')
self.step.addCompleteLog(code + ': ' + name_part[0].strip() + name_part[1] + os.path.basename(name_part[2]), activeVerboseLog)

So os.path.basename('ADT/./ADTTests.exe/90/93') returns 93.

It seems the LIT or LLVM-Unit prints incorrect test names to the full log.
Note the summary contains correct test names at the end of log:

Failed Tests (3):
  LLVM-Unit :: ADT/./ADTTests.exe/PagedVectorTest/EmptyTest
  LLVM-Unit :: ADT/./ADTTests.exe/PagedVectorTest/HalfPageFillingTest
  LLVM-Unit :: ADT/./ADTTests.exe/PagedVectorTest/ShrinkTest

Probably we must report this issue to the LIT or LLVM-Unit instead.

@slydiman
Copy link
Contributor

FYI
https://reviews.llvm.org/D122251#3491642

selected_tests, discovered_tests = gtest.post_process_results(selected_tests, discovered_tests) updates test names before printing the summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants