Skip to content

Conversation

@allannk
Copy link
Contributor

@allannk allannk commented Jan 11, 2023

Leaving an empty yaml file in any DTS_ROOT included directories will currently crash the script dts/gen_driver_kconfig_dts.py. Added a check to skip any empty files, like it is already skipping unparsable files and files without a compatible field.

Fixes: #54683

@carlescufi
Copy link
Member

@allannk you will need to fix your commit message, see here:
https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-guidelines

@mbolivar-nordic
Copy link
Contributor

@allannk please consider also watching this short video on how to get your patches merged: https://www.youtube.com/watch?v=mnVNLM7ynMQ

@allannk allannk changed the title Skip empty yaml files scripts: dts: Skip empty yaml files Jan 13, 2023
galak
galak previously approved these changes Feb 9, 2023
@galak
Copy link
Contributor

galak commented Feb 9, 2023

@mbolivar-nordic take another look

mbolivar-nordic
mbolivar-nordic previously approved these changes Feb 9, 2023
@mbolivar-nordic mbolivar-nordic added the bug The issue is a bug, or the PR is fixing a bug label Feb 9, 2023
@mbolivar-nordic mbolivar-nordic added this to the v3.3.0 milestone Feb 9, 2023
The YAML parsing will currently return a None-type if no input data
is empty, and the subsequent check for a substring will cause an
exception.

Signed-off-by: Allan Norgaard <[email protected]>
@stephanosio stephanosio modified the milestones: v3.3.0, v3.4.0 Feb 10, 2023
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allannk now that this PR has green CI, please do not push into it again. Every time you push, we have to re-approve. Thanks!

@nashif nashif merged commit 23cacb3 into zephyrproject-rtos:main Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Devicetree bug The issue is a bug, or the PR is fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing input validation in gen_driver_kconfig_dts.py

8 participants