[all-commits] [llvm/llvm-project] ca7628: [lldb] Fix test TestBSDArchives.py properly
kusmour via All-commits
all-commits at lists.llvm.org
Tue Aug 1 13:39:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ca76281917d0d5aa40472d237584fd983a19d246
https://github.com/llvm/llvm-project/commit/ca76281917d0d5aa40472d237584fd983a19d246
Author: Wanyi Ye <kusmour at gmail.com>
Date: 2023-08-01 (Tue, 01 Aug 2023)
Changed paths:
M lldb/test/API/functionalities/archives/Makefile
M lldb/test/API/functionalities/archives/TestBSDArchives.py
Log Message:
-----------
[lldb] Fix test TestBSDArchives.py properly
The previous patch D156367 introduced a test debugging thin archive with one of the linked object file missing. It actually failed on green dragon build bots. I put up a speculative fix (https://github.com/llvm/llvm-project/commit/4520cc066b2ffe5ac261e3aca887cba3f113b1ff) that only fixed the symptom of it.
The actual root cause was that the timestamps were set to 0 when creating the thin archive
Makefile command
```
llvm-ar -rcsDT libfoo-thin.a a.o b.o
```
Where the flag "[D] - use zero for timestamps and uids/gids (default)" according to the llvm-ar help
Use "[U] - use actual timestamps and uids/gids" fixed the timestamp
Now the test is actually getting error from missing object file linked to the thin archive instead of the mismatched timestamp.
This means removing one of the object file a.o should only result in failure breaking at `a()`; breaking at `b()` should work just fine.
Test Plan:
All 4 test cases passed
```
▶ ./bin/llvm-lit -vv ../llvm-project/lldb/test/API/functionalities/archives/TestBSDArchives.py
llvm-lit: /Users/wanyi/local/llvm-project/lldb/test/API/lit.cfg.py:173: warning: Could not set a default per-test timeout. Requires the Python psutil module but it could not be found. Try installing it via pip or via your operating system's package manager.
-- Testing: 1 tests, 1 workers --
PASS: lldb-api :: functionalities/archives/TestBSDArchives.py (1 of 1)
Testing Time: 8.07s
Passed: 1
1 warning(s) in tests
```
Differential Revision: https://reviews.llvm.org/D156564
More information about the All-commits
mailing list