The export regexps match any first character, so a context line
starting with a space, like the export macro next to a removed
function, is recorded as a symbol removal.
It makes the script report a false positive, for example removing
an experimental function while rte_eth_dev_get_dcb_info() is kept
a few lines below prints:
INFO: rte_eth_dev_get_dcb_info in lib/ethdev has been
removed from stable ABI.
Match only added and removed diff lines, starting with + or -.
Signed-off-by: Roman Khromenok <[email protected]>
---
devtools/check-symbol-change.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/devtools/check-symbol-change.py b/devtools/check-symbol-change.py
index b1daa2934a..9b79b9be49 100755
--- a/devtools/check-symbol-change.py
+++ b/devtools/check-symbol-change.py
@@ -10,9 +10,9 @@
new_file_regexp = re.compile(r"^(\-\-\-|\+\+\+) [ab]/")
file_header_regexp = re.compile(r"^(\-\-\-|\+\+\+)
[ab]/(lib|drivers)/([^/]+)/([^/]+)")
# From eal_exports.h
-export_exp_sym_regexp =
re.compile(r"^.RTE_EXPORT_EXPERIMENTAL_SYMBOL\(([^,]+),")
-export_int_sym_regexp = re.compile(r"^.RTE_EXPORT_INTERNAL_SYMBOL\(([^)]+)\)")
-export_sym_regexp = re.compile(r"^.RTE_EXPORT_SYMBOL\(([^)]+)\)")
+export_exp_sym_regexp =
re.compile(r"^[+-]RTE_EXPORT_EXPERIMENTAL_SYMBOL\(([^,]+),")
+export_int_sym_regexp =
re.compile(r"^[+-]RTE_EXPORT_INTERNAL_SYMBOL\(([^)]+)\)")
+export_sym_regexp = re.compile(r"^[+-]RTE_EXPORT_SYMBOL\(([^)]+)\)")
parser = argparse.ArgumentParser(
description=__doc__,
--
2.47.3