Skip to content

Conversation

@nandojve
Copy link
Contributor

Fixes 2 issues related to twister. When trying to run it in the folder twister can not load the yaml data due to invalid schema attributes.

$ west twister -T ../bootloader/mcuboot
INFO    - Using Ninja..
INFO    - Zephyr version: v4.3.0-2765-g5a58989daddd
INFO    - Using 'zephyr' toolchain.
ERROR   - /workspace/zephyr/bootloader/mcuboot/samples/zephyr/hello-world: can't load (skipping): SchemaError(msg='Schema validation failed:
 - Key 'platforms' was not defined. Path: '/sample'.
 - Value '[{'test': {'build_only': True, 'tags': 'samples tests', 'min_ram': 16}}]' is not a dict. Value path: '/tests'.')
$ west twister -T ../bootloader/mcuboot
INFO    - Using Ninja..
INFO    - Zephyr version: v4.3.0-2765-g5a58989daddd
INFO    - Using 'zephyr' toolchain.
ERROR   - /workspace/zephyr/bootloader/mcuboot/samples/zephyr/hello-world: can't load (skipping): SchemaError(msg='Schema validation failed:
 - Value '[{'test': {'build_only': True, 'tags': 'samples tests', 'min_ram': 16}}]' is not a dict. Value path: '/tests'.')

This patch fixes those issues and allow twister to run.

In the sample.yaml file the 'platforms' key was not defined in the
schema. This causes an error when try to run twister.

$ west twister -T ../bootloader/mcuboot
INFO    - Using Ninja..
INFO    - Zephyr version: v4.3.0-2765-g5a58989daddd
INFO    - Using 'zephyr' toolchain.
ERROR   - /workspace/zephyr/bootloader/mcuboot/samples/zephyr/hello-world: can't load (skipping): SchemaError(msg='Schema validation failed:
 - Key 'platforms' was not defined. Path: '/sample'.
 - Value '[{'test': {'build_only': True, 'tags': 'samples tests', 'min_ram': 16}}]' is not a dict. Value path: '/tests'.')

This patch remove the 'platforms' invalid entry.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
In the current sample.yaml file definition the '- test' key is invalid
in the schema. It causes the twister to fail when try to load the spec.

$ west twister -T ../bootloader/mcuboot
INFO    - Using Ninja..
INFO    - Zephyr version: v4.3.0-2765-g5a58989daddd
INFO    - Using 'zephyr' toolchain.
ERROR   - /workspace/zephyr/bootloader/mcuboot/samples/zephyr/hello-world: can't load (skipping): SchemaError(msg='Schema validation failed:
 - Value '[{'test': {'build_only': True, 'tags': 'samples tests', 'min_ram': 16}}]' is not a dict. Value path: '/tests'.')

This rename 'test' key to 'mcuboot.samples.zephyr.hello_world.sysbuild'
to avoid name collision and fix the schema validation. In addition, it
fixes the code identation respection 2 spaces.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Formate the 'tags' key value from a scalar value to a sequence value.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
@nandojve nandojve requested a review from JarmouniA December 20, 2025 17:00
@nordicjm
Copy link
Collaborator

Actually might just remove this sample entirely, it's been broken for ages and there already is one in zephyr https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/sysbuild/with_mcuboot with better support so is superfluous

@nandojve
Copy link
Contributor Author

Hi @utzig ,

Actually might just remove this sample entirely, it's been broken for ages and there already is one in zephyr https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/sysbuild/with_mcuboot with better support so is superfluous

I don't mind to open a PR to remove the sample/zephyr if nobody is using.
Could you advice ?

@nordicjm
Copy link
Collaborator

Hi @utzig ,

Actually might just remove this sample entirely, it's been broken for ages and there already is one in zephyr https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/sysbuild/with_mcuboot with better support so is superfluous

I don't mind to open a PR to remove the sample/zephyr if nobody is using. Could you advice ?

#2590

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