Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[16.0] spec.sh -v - print valid json#5326

Merged
eriknordmark merged 5 commits into
lf-edge:16.0from
christoph-zededa:spec_verbose_json_fixes_13.4_16.0
Oct 28, 2025
Merged

[16.0] spec.sh -v - print valid json#5326
eriknordmark merged 5 commits into
lf-edge:16.0from
christoph-zededa:spec_verbose_json_fixes_13.4_16.0

Conversation

@christoph-zededa

Copy link
Copy Markdown
Contributor

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

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

For backport PRs (remove it if it's not a backport):

  • I've added a reference link to the original PR
  • PR's title follows the template

And the last but not least:

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

Please, check the boxes above after submitting the PR in interactive mode.

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)

@eriknordmark eriknordmark 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.

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.

@eriknordmark eriknordmark merged commit 017eb2b into lf-edge:16.0 Oct 28, 2025
65 of 74 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