Skip to content

add a procedure for dealing with known-good differences#2689

Open
bradgrantham-lunarg wants to merge 1 commit intoLunarG:devfrom
bradgrantham-lunarg:brad-add-known-good-readme
Open

add a procedure for dealing with known-good differences#2689
bradgrantham-lunarg wants to merge 1 commit intoLunarG:devfrom
bradgrantham-lunarg:brad-add-known-good-readme

Conversation

@bradgrantham-lunarg
Copy link
Copy Markdown
Contributor

* Generated with this series of prompts:

    prompt: We have test cases in https://github.com/LunarG/gfxreconstruct/tree/dev/test/test_cases and known good GFXR outputs in "known_good".  Our CI runs and captures the test_cases through Mock driver and captures and complains when the output doesn't match the known good .gfxr.  Please generate a README.md I can put in .../test for how to proceed with fixing a .gfxr file when the comparison fails.  A sample comparison failure is attached.
    And a link with the full failure if desired is https://productionresultssa4.blob.core.windows.net/actions-results/f7fe19d3-7952-4a36-a7c8-b4117617ae1a/workflow-job-run-40c56dfc-694b-525e-a86c-9e41a08894c4/logs/job/job-logs.txt?rsct=text%2Fplain&se=2026-02-13T17%3A31%3A05Z&sig=4Ip2gaBbPdVal9uIO0Y8n6lRBO5pJYfiW26P6M3%2BOWU%3D&ske=2026-02-13T20%3A27%3A25Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2026-02-13T16%3A27%3A25Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2026-02-13T17%3A21%3A00Z&sv=2025-11-05

    prompt: Rather than running the file locally to get the results, please suggest getting the artifacts from the failing GitHub Action.
@ci-tester-lunarg
Copy link
Copy Markdown
Collaborator

CI gfxreconstruct build queued with queue ID 648581.

@bradgrantham-lunarg bradgrantham-lunarg requested review from a team and removed request for a team February 13, 2026 21:23
@ci-tester-lunarg
Copy link
Copy Markdown
Collaborator

CI gfxreconstruct build # 648581 cancelled.

@bradgrantham-lunarg bradgrantham-lunarg marked this pull request as ready for review February 17, 2026 22:54
@bradgrantham-lunarg bradgrantham-lunarg requested a review from a team as a code owner February 17, 2026 22:54
@bradgrantham-lunarg
Copy link
Copy Markdown
Contributor Author

@MarkY-LunarG I added this because you just worked through this. Could you take a look, please?


The comparison is performed by `verify-gfxr.cpp`, which converts both the captured and
known-good `.gfxr` files to JSON, then produces a JSON Patch (RFC 6902) diff. A test
passes when the diff is empty (`diff.size() == 0`).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might be worth noting what's ignored by the verify-gfxr.cpp tool

The comparison is performed by `verify-gfxr.cpp`, which converts both the captured and
known-good `.gfxr` files to JSON, then produces a JSON Patch (RFC 6902) diff. A test
passes when the diff is empty (`diff.size() == 0`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can reproduce these failures typically locally by running the run_tests.sh script. Is it worth mentioning that they could pre-emptively fix issues by doing this locally, running the compare, and then if all is well replacing the "known_good" version with the newly generated version?

Comment on lines +89 to +99
```bash
# Convert the new capture from the downloaded artifact to JSON
gfxrecon-convert --format json pipeline-binaries.gfxr

# Convert the known-good reference to JSON
gfxrecon-convert --format json test/known_good/pipeline-binaries.gfxr

# Diff the JSON outputs
diff <(jq . pipeline-binaries.jsonl) \
<(jq . test/known_good/pipeline-binaries.jsonl)
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My artifacts file contained the JSON files already, no conversion needed

Copy link
Copy Markdown
Contributor

@MarkY-LunarG MarkY-LunarG left a comment

Choose a reason for hiding this comment

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

A few points of clarification

@bradgrantham-lunarg bradgrantham-lunarg added the approved-to-run-ci Can run CI check on internal LunarG machines label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-to-run-ci Can run CI check on internal LunarG machines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants