Skip to content

gdb.rocm/watchpoint-basic: add KFAILs for known configurations#203

Open
amd-shahab wants to merge 1 commit into
amd-stagingfrom
users/shvahedi/watch-kfail
Open

gdb.rocm/watchpoint-basic: add KFAILs for known configurations#203
amd-shahab wants to merge 1 commit into
amd-stagingfrom
users/shvahedi/watch-kfail

Conversation

@amd-shahab

Copy link
Copy Markdown
Contributor

Motivation

Failures on GFX1201.

Technical Details

Some of the tests in gdb.rom/watchpoint-basic are destined to fail due to a known failure in KFD. This patch marks those tests as such on configurations that this can happen. See AIROCGDB-555.

Test Plan

See the failing tests as KFAILs on a GFX1201 system.

Test Result

                === gdb Summary ===

# of expected passes            34
# of unknown successes          23

Some of the tests in gdb.rom/watchpoint-basic are destined to fail
due to a known failure in KFD.  This patch marks those tests as such
on configurations that this can happen.

Change-Id: Iafd40b18bf8eb7004c8653bca1407b8d86ca0032
@amd-shahab amd-shahab requested review from lancesix and simark July 13, 2026 15:12
@amd-shahab amd-shahab self-assigned this Jul 13, 2026
@amd-shahab amd-shahab requested a review from a team as a code owner July 13, 2026 15:12
"Hardware watchpoint $::decimal: .*" \
"set watchpoint on *ptr1"

maybe_kfail

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we stop at the first failure and bail out? We'd have the KFAIL marked and we could carry on with other tests. I'm not sure I see the value in the multiple KFAIL's unless each of them is unique and may randomly happen or may not happen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the first sight, this would cause inconsistent number of tests between different systems.
However, please add a patch snippet of what you propose, so I can understand it better.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would cause the number of tests to differ indeed. But if the tests we're potentially marking as KFAIL are of the same type (waiting for a watchpoint hit), I think that would be OK. For me a single KFAIL would already convey the message that there is something broken beyond our control.

My suggestion was to detect early when a target is misbehaving in a known way, catch that, issue a KFAIL and then stop the test. Just a suggestion anyway.

It also avoids polluting the test with a lot of calls to maybe_kfail.

@amd-shahab amd-shahab Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I'll let @lsix / @simark chime in as well, then I'll adjust it (hopefully once for all).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having that many maybe_kfail feels wrong. It makes the test unreadable.

We do have other cases where we bail out early, for example it is quite common to have

if {![runto_main]} {
  return
}

which would also change the number of test results.

If we want a kfail each time, we would at least include this in the definition of continue_to_watchpoint_hit, not at every call, and have a similar helper to do the continue.

I do not really know if upstream has a policy regarding this, comments welcome.

What we need is to be sure to execute enough steps in the test to actually see the failure (or new success when we will eventually have a fix, this will become a kpass), so this is not ignored.

}
}

# On some systems, KFD messes up the watchpoint configurations

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the "messes up" language a bit strong here. Might be worth softening it a bit.

gdb_caching_proc target_has_kfail {} {
set kfail_arches {gfx1201}

# Check for targets where this test will fail without precise memory.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is precise memory involved here? I do not expect so.


proc maybe_kfail {} {
if {[target_has_kfail]} {
setup_kfail "*-*-*" "bad queue mapping in kfd."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queue mapping works, watchpoint configuration does not.

"Hardware watchpoint $::decimal: .*" \
"set watchpoint on *ptr1"

maybe_kfail

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having that many maybe_kfail feels wrong. It makes the test unreadable.

We do have other cases where we bail out early, for example it is quite common to have

if {![runto_main]} {
  return
}

which would also change the number of test results.

If we want a kfail each time, we would at least include this in the definition of continue_to_watchpoint_hit, not at every call, and have a similar helper to do the continue.

I do not really know if upstream has a policy regarding this, comments welcome.

What we need is to be sure to execute enough steps in the test to actually see the failure (or new success when we will eventually have a fix, this will become a kpass), so this is not ignored.

@palves

palves commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

a known failure in KFD.

Pedantically, upstream, we use KFAIL for known issues in GDB itself (that we're too lazy^W^W^W we don't have the time to fix right now), and XFAIL for known external problems we don't have control over. This sounds like the latter kind.

This helps when looking at gdb.sum results, as KFAILs are things we can work on to fix, XFAILs, not so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants