-
Notifications
You must be signed in to change notification settings - Fork 12
tests: dt_binding_check: new test #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
We currently "rely" on Rob Herring's mail bot to provide sanity checking on patches that touch device tree bindings: https://lore.kernel.org/netdev/[email protected] and that is sufficient in "public" settings (patches sent to [email protected] and [email protected] also copied). But in "private" settings (i.e. individual developers encouraged to do sanity checking on their own, for example by running ingest_mdir), we quickly find that Rob's mail bot is apparently closed source, and it has happened more than once (at least to me) for me to miss newly introduced dt_binding_check errors even if I did the due dilligence of running that test locally. So an automated check would be good to have. The justification for including it in NIPA is that while device tree maintainers review binding patches, they get applied to the subsystem tree (in this case netdev). Furthermore, I don't see the overlap with Rob Herring's mail bot as being a strong reason against such checks in NIPA, similar to how the existence of Intel's kbuild test robot does not preclude NIPA from having build tests. In terms of implementation, "make dt_binding_check" does not always nicely print "error" or "warning" on the lines with issues. Furthermore, the errors are multi-line. So instead of filtering for error lines, here we filter out the "normal" lines, which contain things such as "make", "SCHEMA", "CHKDT", "LINT", "DTEX", "DTC" at the beginning. Signed-off-by: Vladimir Oltean <[email protected]>
|
I've marked this as "draft" because it doesn't run "pip3 install dtschema --upgrade" - I am using through ingest_mdir.py so that would translate into a system requirement. I'm not even sure where that would go - in my case I am updating dtschema prior to each build, due to the high frequency of changes. |
|
I have no experience with checks which require some sort of external dependency to be updated. Can't think of a reason why |
|
Well, one reason against running |
|
Is there a way we can check if dtschema is already installed by the user? As implicit agreement to update it. |
|
So Secondly, updating the same local package during the build still risks corrupting the dtschema state for other builds. I still think that each build needs to have its own. |
Could we not simply have a CI and anybody else could periodically run And the good thing is that this file can also be used with venv. |
|
Eh, I was hoping Edit: there is --require-virtualenv. Are you saying with the "secondly" that that's still not good enough because user may not expect update? |
Sorry, but I don't understand the intersection between what problems does We don't need specific I'm not running pw_poller.py (and maybe that's part of the problem in understanding), but AFAIU based on the README, there is no time in between builds where such package updates could take place. Assuming a CI running at full steam, this could only be done in Python code by creating a venv for each Tester object (worker), which is isolated from every other worker. |
No. Updating the user's packages neither helps nor inherently breaks things. I'm just saying that the CI probably needs to manage a venv for each worker, since there is otherwise no right time to update this package if installed either system-wide or at the user level, because there might be multiple workers pipelined, and there's no "RCU" for package management. |
We currently "rely" on Rob Herring's mail bot to provide sanity checking on patches that touch device tree bindings:
https://lore.kernel.org/netdev/[email protected]
and that is sufficient in "public" settings (patches sent to [email protected] and [email protected] also copied).
But in "private" settings (i.e. individual developers encouraged to do sanity checking on their own, for example by running ingest_mdir), we quickly find that Rob's mail bot is apparently closed source, and it has happened more than once (at least to me) for me to miss newly introduced dt_binding_check errors even if I did the due dilligence of running that test locally. So an automated check would be good to have.
The justification for including it in NIPA is that while device tree maintainers review binding patches, they get applied to the subsystem tree (in this case netdev).
Furthermore, I don't see the overlap with Rob Herring's mail bot as being a strong reason against such checks in NIPA, similar to how the existence of Intel's kbuild test robot does not preclude NIPA from having build tests.
In terms of implementation, "make dt_binding_check" does not always nicely print "error" or "warning" on the lines with issues. Furthermore, the errors are multi-line. So instead of filtering for error lines, here we filter out the "normal" lines, which contain things such as "make", "SCHEMA", "CHKDT", "LINT", "DTEX", "DTC" at the beginning.