From bfbcdd1bd24220671ad75702efebd62c0291192d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marczewski?= Date: Tue, 20 Oct 2020 12:07:08 +0200 Subject: [PATCH] [LibOS] test/ltp: Detect duplicate configuration sections --- LibOS/shim/test/ltp/contrib/conf_lint.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LibOS/shim/test/ltp/contrib/conf_lint.py b/LibOS/shim/test/ltp/contrib/conf_lint.py index 511a52be..2a377e88 100755 --- a/LibOS/shim/test/ltp/contrib/conf_lint.py +++ b/LibOS/shim/test/ltp/contrib/conf_lint.py @@ -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))