Skip to content
Commit ca762819 authored by Wanyi Ye's avatar Wanyi Ye
Browse files

[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
parent 53f5bfdb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment