Skip to content

Added support for xpath coverage report generation#1530

Merged
mattiaswal merged 1 commit into
kernelkit:mainfrom
saba8814:test/xpath-coverage-heatmap
Jun 15, 2026
Merged

Added support for xpath coverage report generation#1530
mattiaswal merged 1 commit into
kernelkit:mainfrom
saba8814:test/xpath-coverage-heatmap

Conversation

@saba8814

@saba8814 saba8814 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR introduces heatmap report for all XPaths covered by tests.
PR introduces extract-all-xpaths routine in Make, that is run before "make test" it's output is list of all xpaths this file is used to compare with actually covered xpaths, that are marked as "seen" in the test "transport" layer.

Output of the the file is approximately 80 pages .md file that has 2 sections:
section 1. - Summary of coverage per module
section 2. - Detailed heatmap

Xpaths are marked in 3 colors and their meanings are:

  • 🟢 Every XPath in the module was touched by at least one test operation
  • 🟠 Some XPaths were touched but others were not
  • 🔴 No test operation reached any XPath in the module

Screenshots

Title Page:
image

Summary:
image

Detailed:
image

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@saba8814 saba8814 marked this pull request as draft June 8, 2026 11:11
@saba8814 saba8814 force-pushed the test/xpath-coverage-heatmap branch from 76f125c to dea16ef Compare June 8, 2026 11:12
@saba8814 saba8814 marked this pull request as ready for review June 8, 2026 11:15
@saba8814 saba8814 marked this pull request as draft June 8, 2026 20:58
@saba8814 saba8814 force-pushed the test/xpath-coverage-heatmap branch 8 times, most recently from 2d2158b to 9fc86f6 Compare June 11, 2026 11:33
@saba8814 saba8814 marked this pull request as ready for review June 11, 2026 11:34
@mattiaswal

Copy link
Copy Markdown
Contributor

Just a general thing:
Screenshot from 2026-06-11 13-46-57
and the yang model:

  leaf gm-timebase-indicator {
      type uint16;
      config false;
      description
        "The timeBaseIndicator of the current Grandmaster PTP
         Instance.";
      reference
        "14.3.6 of IEEE Std 802.1AS";
    }
    leaf gm-change-count {
      type yang:counter32;
      config false;
      description
        "This statistics counter tracks the number of times the
         Grandmaster PTP Instance has changed in a gPTP domain.";
      reference
        "14.3.7 of IEEE Std 802.1AS";
    }

this is notes that is impossible to set since config false the coverage looks much worse than it is. Is it possible to skip config false nodes, since they only is operational.

@saba8814

Copy link
Copy Markdown
Collaborator Author

Just a general thing: Screenshot from 2026-06-11 13-46-57 and the yang model:

  leaf gm-timebase-indicator {
      type uint16;
      config false;
      description
        "The timeBaseIndicator of the current Grandmaster PTP
         Instance.";
      reference
        "14.3.6 of IEEE Std 802.1AS";
    }
    leaf gm-change-count {
      type yang:counter32;
      config false;
      description
        "This statistics counter tracks the number of times the
         Grandmaster PTP Instance has changed in a gPTP domain.";
      reference
        "14.3.7 of IEEE Std 802.1AS";
    }

this is notes that is impossible to set since config false the coverage looks much worse than it is. Is it possible to skip config false nodes, since they only is operational.

I've addded SKIP_MODULES list, guess I can extract all config false and place them there.

@saba8814

Copy link
Copy Markdown
Collaborator Author

Collaborator

@mattiaswal I've added skip for all config false now in separate commit.

Comment thread .github/workflows/test.yml Outdated
@saba8814 saba8814 force-pushed the test/xpath-coverage-heatmap branch 2 times, most recently from ea77a78 to 7f1ebf8 Compare June 15, 2026 10:25
This commit introduces xpath coverage test report. It plugs into transport layer of test system and generates .md report.
Commit also introduces "make xpath-coverage-report" used to generate pdf out of md.

Resolves: kernelkit#581
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
@saba8814 saba8814 force-pushed the test/xpath-coverage-heatmap branch from 7f1ebf8 to 9853e08 Compare June 15, 2026 10:26
@mattiaswal mattiaswal self-requested a review June 15, 2026 14:49

@mattiaswal mattiaswal left a comment

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.

Great work on this 👍

@mattiaswal mattiaswal merged commit ff96401 into kernelkit:main Jun 15, 2026
7 checks passed
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.

3 participants