mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
tests/leaks.sh: add test for PATH reset leak triggered by nmake build
This commit is contained in:
parent
52dc071a56
commit
f89fc2c713
1 changed files with 8 additions and 1 deletions
|
@ -143,7 +143,14 @@ do PATH=/dev/null true # set/restore PATH & clear hash table
|
||||||
command -v ls # do PATH search, add to hash table
|
command -v ls # do PATH search, add to hash table
|
||||||
done >/dev/null
|
done >/dev/null
|
||||||
after=$(getmem)
|
after=$(getmem)
|
||||||
err_exit_if_leak 'memory leak on PATH reset before subshell PATH search'
|
err_exit_if_leak 'memory leak on PATH reset before PATH search'
|
||||||
|
# ...test for another leak that only shows up when building with nmake:
|
||||||
|
before=$(getmem)
|
||||||
|
for ((i=0; i < N; i++))
|
||||||
|
do PATH=/dev/null true # set/restore PATH & clear hash table
|
||||||
|
done >/dev/null
|
||||||
|
after=$(getmem)
|
||||||
|
err_exit_if_leak 'memory leak on PATH reset'
|
||||||
|
|
||||||
# ======
|
# ======
|
||||||
# Defining a function in a virtual subshell
|
# Defining a function in a virtual subshell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue