summaryrefslogtreecommitdiff
path: root/tools/patman/test_checkpatch.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-02-13 08:56:38 -0700
committerSimon Glass <sjg@chromium.org>2023-02-14 09:43:27 -0700
commit48be546b70f509d8ac02288fd5069913ec9196f3 (patch)
tree689a434be90fb42e32db7332f154cd39c29ecea9 /tools/patman/test_checkpatch.py
parent0a06d7106195bbbe3126d205c1c173d6eb9e48a8 (diff)
checkpatch: Add a warning for pre-schema driver model tags
Help ensure that these don't creep into development by adding a check in checkpatch for them. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/test_checkpatch.py')
-rw-r--r--tools/patman/test_checkpatch.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/patman/test_checkpatch.py b/tools/patman/test_checkpatch.py
index 4c2ab6e590e..a8bb364e42b 100644
--- a/tools/patman/test_checkpatch.py
+++ b/tools/patman/test_checkpatch.py
@@ -452,6 +452,12 @@ index 0000000..2234c87
self.check_strl("cat");
self.check_strl("cpy");
+ def test_schema(self):
+ """Check for uses of strn(cat|cpy)"""
+ pm = PatchMaker()
+ pm.add_line('arch/sandbox/dts/sandbox.dtsi', '\tu-boot,dm-pre-proper;')
+ self.check_single_message(pm, 'PRE_SCHEMA', 'error')
+
if __name__ == "__main__":
unittest.main()
gitutil.RunTests()