static: compare the capability tables instead of a copy of the answer #1

Open
nonos-sync wants to merge 2 commits from nonos-sync/gh-3 into main AGit
Member

The abi/caps.toml check compared the file against four graphics values written into this script:

'GRAPHICS_DISPLAY_QUERY=0x0000_0000_0000_0800' \
'GRAPHICS_SURFACE_CREATE=0x0000_0000_0000_1000' \
...
note ok "abi/caps.toml carries graphics capability bits aligned to runtime"

That is a third copy of the table, not a comparison between the two that exist. It passed while abi/caps.toml published TIME on the bit the kernel uses for Network, LOG on CoreExec, YIELD on IO and KSTAT on Memory, and left 22 capabilities unpublished.

Replaced with the checkers, each comparing against src/capabilities/types/bit.rs:

script compares
check_caps_abi.py kernel vs abi/caps.toml
check_service_caps.py service CAP_* constants vs kernel bits
check_cap_parity.py kernel vs nonos_cap vs nonos_manifest

--allow-stale-groups reports [groups] names that [bits] does not define without failing, since which capabilities a group should hold is policy and cannot be derived from the enum.

Depends on NON-OS/nonos-micro-kernel#442, which adds the scripts. Merge that first.


Opened on GitHub by eKisNonos as pull request 3. Review and merge happen there while this repository is kept in step from GitHub; this copy follows it, and is marked merged or closed when it is.

The `abi/caps.toml` check compared the file against four graphics values written into this script: 'GRAPHICS_DISPLAY_QUERY=0x0000_0000_0000_0800' \ 'GRAPHICS_SURFACE_CREATE=0x0000_0000_0000_1000' \ ... note ok "abi/caps.toml carries graphics capability bits aligned to runtime" That is a third copy of the table, not a comparison between the two that exist. It passed while `abi/caps.toml` published `TIME` on the bit the kernel uses for `Network`, `LOG` on `CoreExec`, `YIELD` on `IO` and `KSTAT` on `Memory`, and left 22 capabilities unpublished. Replaced with the checkers, each comparing against `src/capabilities/types/bit.rs`: | script | compares | |---|---| | `check_caps_abi.py` | kernel vs `abi/caps.toml` | | `check_service_caps.py` | service `CAP_*` constants vs kernel bits | | `check_cap_parity.py` | kernel vs `nonos_cap` vs `nonos_manifest` | `--allow-stale-groups` reports `[groups]` names that `[bits]` does not define without failing, since which capabilities a group should hold is policy and cannot be derived from the enum. Depends on NON-OS/nonos-micro-kernel#442, which adds the scripts. Merge that first. --- Opened on GitHub by eKisNonos as [pull request 3](https://github.com/NON-OS/nonos-ci/pull/3). Review and merge happen there while this repository is kept in step from GitHub; this copy follows it, and is marked merged or closed when it is.
The abi/caps.toml check compared the file against four graphics values
written into this script, so it was a third copy of the table rather than a
comparison between the two that exist. It passed while the file published
TIME on the bit the kernel uses for Network and left 22 capabilities out.

Run the checkers in scripts/ instead. Group names in abi/caps.toml are policy
and cannot be derived from the enum, so they are reported without failing.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin +refs/pull/1/head:nonos-sync/gh-3
git switch nonos-sync/gh-3
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
NON-OS/nonos-ci!1
No description provided.