1 # "Check many leaks" test #1
2 # Cramming all kinds of weird commands in here.
3 # As you find leaks, please create separate, small test
5 # Narrowing down the leak using this large test may be difficult.
6 # It is intended to be a blanket "is everything ok?" test
13 while test $i != 99; do
14 t=value1_$i; t=value2_$i true; t=value3_$i /bin/true; t=value4_$i exec 1>&1
15 { t=value3_$i /bin/true; } </dev/null
16 if true; t=valueA_$i false >>/dev/null; true; then
17 : << HERE >/dev/null; true <<HERE
25 { true; }; echo Doesnt run too >>/foo/bar
29 echo >/dev/null ${var#}
30 echo >/dev/null ${var##}
31 echo >/dev/null ${var#*}
32 echo >/dev/null ${var##*}
33 echo >/dev/null ${var%}
34 echo >/dev/null ${var%%}
35 echo >/dev/null ${var%*}
36 echo >/dev/null ${var%%*}
38 echo >/dev/null ${var#}
39 echo >/dev/null ${var##}
40 echo >/dev/null ${var#*}
41 echo >/dev/null ${var##*}
42 echo >/dev/null ${var%}
43 echo >/dev/null ${var%%}
44 echo >/dev/null ${var%*}
45 echo >/dev/null ${var%%*}
47 echo >/dev/null ${var#ab}
48 echo >/dev/null ${var##ab}
49 echo >/dev/null ${var#a*b}
50 echo >/dev/null ${var##a*b}
51 echo >/dev/null ${var#?}
52 echo >/dev/null ${var##?}
53 echo >/dev/null ${var#*}
54 echo >/dev/null ${var##*}
55 echo >/dev/null ${var%cd}
56 echo >/dev/null ${var%%cd}
57 echo >/dev/null ${var%c*d}
58 echo >/dev/null ${var%%c*d}
59 echo >/dev/null ${var%?}
60 echo >/dev/null ${var%%?}
61 echo >/dev/null ${var%*}
62 echo >/dev/null ${var%%*}
63 set -- par1_$i par2_$i par3_$i par4_$i
64 trap "echo trap$i" WINCH
65 f() { true; true; true; true; true; true; true; true; }
66 f() { true; true; true; true; true; true; true; true; echo $1; }
73 echo "Measuring memory leak..."
74 # Please copy the entire block from above verbatim
79 while test $i != 99; do
80 t=value1_$i; t=value2_$i true; t=value3_$i /bin/true; t=value4_$i exec 1>&1
81 { t=value3_$i /bin/true; } </dev/null
82 if true; t=valueA_$i false >>/dev/null; true; then
83 : << HERE >/dev/null; true <<HERE
91 { true; }; echo Doesnt run too >>/foo/bar
95 echo >/dev/null ${var#}
96 echo >/dev/null ${var##}
97 echo >/dev/null ${var#*}
98 echo >/dev/null ${var##*}
99 echo >/dev/null ${var%}
100 echo >/dev/null ${var%%}
101 echo >/dev/null ${var%*}
102 echo >/dev/null ${var%%*}
104 echo >/dev/null ${var#}
105 echo >/dev/null ${var##}
106 echo >/dev/null ${var#*}
107 echo >/dev/null ${var##*}
108 echo >/dev/null ${var%}
109 echo >/dev/null ${var%%}
110 echo >/dev/null ${var%*}
111 echo >/dev/null ${var%%*}
113 echo >/dev/null ${var#ab}
114 echo >/dev/null ${var##ab}
115 echo >/dev/null ${var#a*b}
116 echo >/dev/null ${var##a*b}
117 echo >/dev/null ${var#?}
118 echo >/dev/null ${var##?}
119 echo >/dev/null ${var#*}
120 echo >/dev/null ${var##*}
121 echo >/dev/null ${var%cd}
122 echo >/dev/null ${var%%cd}
123 echo >/dev/null ${var%c*d}
124 echo >/dev/null ${var%%c*d}
125 echo >/dev/null ${var%?}
126 echo >/dev/null ${var%%?}
127 echo >/dev/null ${var%*}
128 echo >/dev/null ${var%%*}
129 set -- par1_$i par2_$i par3_$i par4_$i
130 trap "echo trap$i" WINCH
131 f() { true; true; true; true; true; true; true; true; }
132 f() { true; true; true; true; true; true; true; true; echo $1; }
140 # Observed some variability, bumped to 12k
141 if test $kb -le 12; then
144 echo "Bad: $kb kb (or more) leaked"