summaryrefslogtreecommitdiffhomepage
path: root/shell/hush_test/hush-z_slow/leak_var3.tests
blob: 9554c42cf2ab06472eb11d1935f9d680187c6e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Was seen leaking on NOMMU build

echo "Warm up"
i=1; t=1; export t
while test $i != 400; do
    t=valueA_$i true
    : $((i++))
done

memleak
echo "Measuring memory leak..."

# Please copy the entire block from above verbatim
i=1; t=1; export t
while test $i != 400; do
    t=valueA_$i true
    : $((i++))
done
i=1; t=1; export t
while test $i != 400; do
    t=valueA_$i true
    : $((i++))
done
i=1; t=1; export t
while test $i != 400; do
    t=valueA_$i true
    : $((i++))
done
i=1; t=1; export t
while test $i != 400; do
    t=valueA_$i true
    : $((i++))
done

memleak
kb=$?
if test $kb -le 4; then
    echo Ok #$kb
else
    echo "Bad: $kb kb (or more) leaked"
fi