[LibOS] test/ltp: Detect duplicate configuration sections

This commit is contained in:
Paweł Marczewski
2020-10-29 17:51:45 +01:00
parent 0c8bc35dab
commit bfbcdd1bd2
+4
View File
@@ -42,6 +42,10 @@ def validate_section_order(name, sections):
mistakes = 0
prev = ''
for lineno, section in sections:
if section == prev:
print('{name}:{lineno}: duplicate section: [{section}]'.format(
name=name, lineno=lineno, section=section))
mistakes += 1
if section < prev:
print('{name}:{lineno}: bad order: [{section}] (after [{prev}])'.format(
name=name, lineno=lineno, section=section, prev=prev))