Hardware watchpoints availability differs between hardware (and it also depends on Linux kernel version).
On POWER9, altivec supported, 2.2 (pvr 004e 1202) the testsuite had 67 FAILs, with this patch it has 23 FAILs (probably no longer watchpoint related).
The problem is UNSUPPORTED keyword can list only a triple and some PowerPC hardware can do hw watchpoints. Therefore I had to implement the UNSUPPORTED category in code.
67 FAILs: https://people.redhat.com/jkratoch/lldb-4b8962940322fe732126ec583013ecb5b6a1112e-ppc64le.log
23 FAILs: https://people.redhat.com/jkratoch/lldb-4b8962940322fe732126ec583013ecb5b6a1112e-fix-ppc64le.log
Details
- Reviewers
mgorny labath JDevlieghere jhibbits nemanjai - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Is there any command we can run to directly get the number of h/w watchpoints?
I'm thinking that a lot of these are:
try: doThing() except: if we got this specific error
Then you could have this at the start of each test instead:
if not self.HasWatchpoints(): self.skipTest(...)
Where HasWatchpoints runs that command. If there isn't a specific command you could do something silly like watch main and see if it succeeds then remove the watchpoint.
Failing that you could make some skipIfErrorNoWatchpoints(err) just to reduce the duplication.
lldb/test/API/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py | ||
---|---|---|
68 | Is the arch check here needed, also should it include powerpc64be? (not very familiar with powerpc but your title says ppc64*) I don't think it would harm to not check the arch. |
Not aware of, I will check and/or code some, thanks for the review.
lldb/test/API/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py | ||
---|---|---|
68 |
ppc64be is not supported by LLDB (and I expect it will never be as PowerPC has moved BE->LE).
I think it would harm. As if there is a regression LLDB falsely reports 0 watchpoints on all arches the testsuite will not find it out. Sure this possible uncaught regression affects also PPC but one cannot do anything with it there. |
lldb/test/API/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py | ||
---|---|---|
68 | I think it would harm. As if there is a regression LLDB falsely reports 0 watchpoints on all arches the testsuite will not find it out. Sure this possible uncaught regression affects also PPC but one cannot do anything with it there. True, I didn't think of it that way. |
If there isn't a specific command you could do something silly like watch main and see if it succeeds then remove the watchpoint.
Or you could watch address 0, there's no requirement for it to be a symbol.
Is the arch check here needed, also should it include powerpc64be? (not very familiar with powerpc but your title says ppc64*)
I don't think it would harm to not check the arch.