automated: linux: modules: add configurable memory tolerance for leak detection

Add configurable memory leak detection tolerance to reduce false positives
from MemAvailable measurement variations due to kernel memory management
artifacts like page cache changes, buffer allocations, and memory fragmentation.

Changes:
- Add MEMORY_TOLERANCE variable (default: 512KB)
- Add -t option to configure tolerance from command line
- Update usage help to document the new option
- Change leak detection from strict (diff < 0) to tolerance-based (diff < -tolerance)

This allows filtering out small memory variations that are not actual leaks
while still detecting significant memory leaks. The default 100KB tolerance
provides a good balance between sensitivity and false positive reduction.

Usage: ./modules.sh -t 512  # Set 512KB tolerance

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
2 files changed
tree: d60851f5b936a08ba0590ccc01403461c88b2f37
  1. .github/
  2. .reuse/
  3. automated/
  4. docs/
  5. LICENSES/
  6. manual/
  7. mkdocs_plugin/
  8. plans/
  9. test/
  10. .gitignore
  11. .readthedocs.yml
  12. COPYING
  13. COPYRIGHTS
  14. mkdocs.yml
  15. README.md
  16. sanity-check.sh
  17. test.sh
  18. validate.py
README.md

Build Status REUSE Compliance Check

Test Definitions

A set of testing scripts designed to work with LAVA. Also contains test-runner script that allows execution outside LAVA.

More details in docs