[16.0] spec.sh -v - print valid json#5326
Merged
eriknordmark merged 5 commits intoOct 28, 2025
Merged
Conversation
it output valid json Signed-off-by: Christoph Ostarek <[email protected]> (cherry picked from commit df53276)
when outputing the description of a PCI device, the quotation marks were missing Signed-off-by: Christoph Ostarek <[email protected]> (cherry picked from commit 23b5a75)
`spec.sh -v` would output `description` for PCI devices
twice. Once is enough though.
Whenever `add_pci_info` also `add_description` is called; as
`add_pci_info` already adds a description (in verbose mode),
there is no need to call `add_description` (which also only
adds a description if in verbose mode).
Therefore `add_description` can just be completely removed.
There is a call of `add_description` with the network interface name:
```
echo "$ETH" | sed -e 's#/net/.*'"${LABEL}" '##' -e 's#^.*/##'
```
but this one supposedly never worked, as `lspci -Ds` does not except
the network interface name as a parameter.
Signed-off-by: Christoph Ostarek <[email protected]>
(cherry picked from commit d6d4467)
if the iommu_group output is empty, then the key in json was missing. Fix this by not printing the iommu_group at all if no iommu group can be found. Signed-off-by: Christoph Ostarek <[email protected]> (cherry picked from commit 849d3f4)
if the COM port is the last element of the IO bundles, a superfluous comma was added at the end. This is an error in json, so don't do this. Signed-off-by: Christoph Ostarek <[email protected]> (cherry picked from commit b7970e6)
rene
approved these changes
Oct 28, 2025
eriknordmark
approved these changes
Oct 28, 2025
eriknordmark
left a comment
Contributor
There was a problem hiding this comment.
The build passes; the output of spec.sh has no possible impact on the eden tests so we can avoid re-running those until they pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #5312
How to test and validate this PR
Run on EVE (in debug container): apk add jq
and check that $? is 0:
3. spec.sh | jq .
4. spec.sh -v | jq .
Changelog notes
Fix output of model manifest generator in verbose mode
PR Backports
Checklist
For backport PRs (remove it if it's not a backport):
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.