automated: linux: modules: update function parameters for cumulative testing
Change check_module_memory_leaks_cumulative() parameters to better support
cumulative memory leak detection:
- Reorder parameters: module name first, then start/end memory values
- Rename variables: before_kb/after_kb -> mem_start/mem_end for clarity
- Update echo message to reflect cumulative nature of the check
This prepares the function interface for cumulative leak detection across
all load/unload iterations for a module, rather than per-iteration checks.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
diff --git a/automated/linux/modules/modules.sh b/automated/linux/modules/modules.sh
index 407d3b1..8b6cd56 100755
--- a/automated/linux/modules/modules.sh
+++ b/automated/linux/modules/modules.sh
@@ -46,12 +46,12 @@
}
check_module_memory_leaks_cumulative() {
- local before_kb=$1
- local after_kb=$2
- local module=$3
+ local module=$1
+ local mem_start=$2
+ local mem_end=$3
local diff_kb
- diff_kb=$((before_kb - after_kb))
- echo "memcheck: before ${before_kb}, after ${after_kb}, diff ${diff_kb}"
+ diff_kb=$((mem_start - mem_end))
+ echo "memcheck cumulative: start ${mem_start}, end ${mem_end}, diff ${diff_kb}"
if [ "$diff_kb" -lt "-${MEMORY_TOLERANCE}" ]; then
report_fail "memcheck_${module}"
else