<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/97834>97834</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            lldb watchpoint tests are run even if the system has no watchpoints
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lldb
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          DavidSpickett
      </td>
    </tr>
</table>

<pre>
    This was reported via Discord. During Fedora snapshot builds on PPC, a whole lot of watchpoint tests failed. Including the full list here because some aren't obviously watchpoint related but turn out to be:
```
Jul 05 06:25:17 ********************
Jul 05 06:25:17 Failed Tests (72):
Jul 05 06:25:17 lldb-api :: commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/unaligned-watchpoint/TestUnalignedWatchpoint.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_count/TestWatchpointCount.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_events/TestWatchpointEvents.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_on_vectors/TestValueOfVectorVariable.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py
Jul 05 06:25:17   lldb-api :: commands/watchpoints/watchpoint_size/TestWatchpointSizes.py
Jul 05 06:25:17   lldb-api :: functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
Jul 05 06:25:17   lldb-api :: functionalities/completion/TestCompletion.py
Jul 05 06:25:17   lldb-api :: functionalities/inline-stepping/TestInlineStepping.py
Jul 05 06:25:17 lldb-api :: functionalities/location-list-lookup/TestLocationListLookup.py
Jul 05 06:25:17   lldb-api :: functionalities/return-value/TestReturnValue.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/cross_object/TestCrossObjectTailCalls.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py
Jul 05 06:25:17   lldb-api :: functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py
Jul 05 06:25:17   lldb-api :: functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py
Jul 05 06:25:17   lldb-api :: functionalities/watchpoint/modify-watchpoints/TestModifyWatchpoint.py
Jul 05 06:25:17   lldb-api :: lang/c/set_values/TestSetValues.py
Jul 05 06:25:17   lldb-api :: lang/c/tls_globals/TestTlsGlobals.py
Jul 05 06:25:17   lldb-api :: lang/cpp/step-through-trampoline/TestStepThroughTrampoline.py
Jul 05 06:25:17   lldb-api :: lang/cpp/trivial_abi/TestTrivialABI.py
Jul 05 06:25:17   lldb-api :: python_api/watchpoint/TestSetWatchpoint.py
Jul 05 06:25:17   lldb-api :: python_api/watchpoint/TestWatchpointIgnoreCount.py
Jul 05 06:25:17 lldb-api :: python_api/watchpoint/TestWatchpointIter.py
Jul 05 06:25:17 lldb-api :: python_api/watchpoint/condition/TestWatchpointConditionAPI.py
Jul 05 06:25:17   lldb-api :: python_api/watchpoint/watchlocation/TestSetWatchlocation.py
Jul 05 06:25:17   lldb-api :: python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
Jul 05 06:25:17   lldb-api :: tools/lldb-dap/databreakpoint/TestDAP_setDataBreakpoints.py
Jul 05 06:25:17   lldb-api :: tools/lldb-server/TestGdbRemoteAttach.py
Jul 05 06:25:17   lldb-api :: tools/lldb-server/TestGdbRemoteProcessInfo.py
Jul 05 06:25:17   lldb-api :: tools/lldb-server/TestGdbRemoteSingleStep.py
Jul 05 06:25:17   lldb-api :: tools/lldb-server/TestGdbRemote_vCont.py
Jul 05 06:25:17   lldb-api :: tools/lldb-server/attach-wait/TestGdbRemoteAttachWait.py
Jul 05 06:25:17 lldb-api :: tools/lldb-server/commandline/TestStubSetSID.py
Jul 05 06:25:17   lldb-shell :: SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll
Jul 05 06:25:17 lldb-shell :: SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp
Jul 05 06:25:17   lldb-shell :: SymbolFile/DWARF/clang-gmodules-type-lookup.c
Jul 05 06:25:17   lldb-shell :: SymbolFile/DWARF/split-optimized.c
Jul 05 06:25:17   lldb-shell :: Watchpoint/ExpressionLanguage.test
Jul 05 06:25:17 
Jul 05 06:25:17 
Jul 05 06:25:17 Testing Time: 426.75s
Jul 05 06:25:17 
Jul 05 06:25:17 Total Discovered Tests: 2990
Jul 05 06:25:17   Excluded         :   26 (0.87%)
Jul 05 06:25:17   Unsupported :  498 (16.66%)
Jul 05 06:25:17   Passed           : 2374 (79.40%)
Jul 05 06:25:17   Expectedly Failed:   20 (0.67%)
Jul 05 06:25:17   Failed           :   72 (2.41%)
```
Looking at the logs they all fail with output like:
```
Jul 05 06:25:06            30: error: Watchpoint creation failed (addr=0x10040038, size=8). 
Jul 05 06:25:06 check:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jul 05 06:25:06            31: error: Target supports (0) hardware watchpoint slots. 
Jul 05 06:25:06 check:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
We should not be running tests on systems where we can tell there are no watchpoints. Or at least we could do a check at the front of each test and print something to tell the user what choices they have here.

I know there is a category for at least the API watchpoint tests, we use it for Windows on Arm for example. That's opt in though.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMWklz47gO_jXKhWWXLG_xwQe33ZnKq_Qk1fZMjipIhCW-UKSGhOy4D--3vyIlL9k6q5NJpTsSSOH7QICLIIC1IlOI46D_LejPTqCiXJvxDFaCz0uR3iDRSaL5ZrzIhWVrsMxgqQ0hZysBbCZsqg1vs1llhMrYGXJtgFkFpc01saQSklumFbu6mgbRlAFb51oik5qYXrI1UJqXWihihJYsW4KQyNvsXKWy4k4l5ciWlZRMCkssR4MswRQqi8zqAhkYVEE0JKaTldCVlZtDrQYlOLJJRYwqo5h2F5olGHQnQTgLwkkwCJtff_ufSrKwz8JB0J1E_aA76QxZEE3e_vuk1jNvK1t4w4PodBgF0WhH67EnpORJC0rBXK_uhKW6KEBxG0Rne5vdXY5S6ng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