|SUCCESS| devtools: ignore context lines in check-symbol-change.py

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Nov 3 16:30:12 CET 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172372

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-03

# DPDK Patch Review

## ERRORS

None.

## WARNINGS

None.

## INFO

### Correctness Analysis

The patch fixes a real bug in the symbol export change detection script. The regular expressions currently match any character in the first position (`^.RTE_EXPORT`), which causes diff context lines (starting with a space) to be incorrectly treated as symbol removals or additions. The fix correctly restricts matching to only added (`+`) or removed (`-`) lines by changing `^.` to `^[+-]`.

**Evidence:**
```python
-export_exp_sym_regexp = re.compile(r"^.RTE_EXPORT_EXPERIMENTAL_SYMBOL\(([^,]+),")
+export_exp_sym_regexp = re.compile(r"^[+-]RTE_EXPORT_EXPERIMENTAL_SYMBOL\(([^,]+),")
```

The pattern `^.` matches any single character at the start of a line, including the space used by diff for context lines. The corrected pattern `^[+-]` explicitly matches only the `+` or `-` that git diff uses to mark added/removed lines.

**Verification:**
The bug description matches the code: a context line containing an `RTE_EXPORT_SYMBOL` macro near a removed function would incorrectly be parsed as a symbol removal, producing the false positive shown in the commit message.

### Testing Consideration

The patch would benefit from a test case demonstrating the false positive scenario described in the commit message (removing an experimental function while keeping a nearby stable function), but this is Info-level since test infrastructure for this script may not exist.

Review-Result: CLEAN


More information about the test-report mailing list