Changeset 14176 for trunk/Ohana/src/opihi/cmd.basic/test/for.sh
- Timestamp:
- Jul 12, 2007, 2:26:24 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/test/for.sh (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/test/for.sh
r10647 r14176 8 8 memtest1 9 9 memtest2 10 memtest2a11 10 memtest3 12 11 end … … 15 14 macro test1 16 15 16 $PASS = 0 17 17 18 local i 18 19 … … 31 32 macro test2 32 33 34 $PASS = 0 35 33 36 local i 34 37 … … 47 50 # do we loop up in small steps correctly? 48 51 macro test3 52 53 $PASS = 0 49 54 50 55 local i N … … 68 73 macro test4 69 74 75 $PASS = 0 76 70 77 local i N 71 78 … … 87 94 # do we break from a loop correctly 88 95 macro test5 96 97 $PASS = 0 89 98 90 99 break -auto off … … 112 121 macro memtest1 113 122 123 $PASS = 0 124 114 125 local i N 115 126 … … 136 147 macro memtest2 137 148 149 $PASS = 0 150 138 151 local i N 139 152 … … 163 176 end 164 177 165 # check memleaks with many loop lines166 macro memtest2a167 168 local i N169 170 list word -x "ps -p $PID -o rss"171 $startmem = $word:1172 173 output /dev/null174 for i 0 10000175 echo "test line in loop"176 echo "test line in loop"177 end178 output stdout179 180 list word -x "ps -p $PID -o rss"181 $endmem = $word:1182 183 $PASS = 1184 185 if ($endmem - $startmem > 10)186 $PASS = 0187 echo "growth: {$endmem-$startmem}"188 echo "kB/loop: {($endmem-$startmem)/10000}"189 end190 end191 192 # check memleaks with many loop lines193 macro memtest2b194 195 local i N196 197 list word -x "ps -p $PID -o rss"198 $startmem = $word:1199 200 output /dev/null201 for i 0 1000202 exec echo "test line in loop" > /dev/null203 exec echo "test line in loop" > /dev/null204 end205 output stdout206 207 list word -x "ps -p $PID -o rss"208 $endmem = $word:1209 210 $PASS = 1211 212 if ($endmem - $startmem > 10)213 $PASS = 0214 echo "growth: {$endmem-$startmem}"215 echo "kB/loop: {($endmem-$startmem)/1000}"216 end217 end218 219 178 # check memleaks on break 220 179 macro memtest3 180 181 $PASS = 0 221 182 222 183 local i N … … 254 215 end 255 216 end 256
Note:
See TracChangeset
for help on using the changeset viewer.
