IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2007, 2:26:24 PM (19 years ago)
Author:
eugene
Message:

added tests from Mark Pitts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/test/list.sh

    r10311 r14176  
    9292 $startmem = $word:1
    9393
    94  for i 0 10000
     94 for i 0 1000
    9595  list check2 -split This is a list
    96  end   
    97  
    98  list word -x "ps -p $PID -o rss"
    99  $endmem = $word:1
    100 
    101  $PASS = 1
    102 
    103  if ($endmem - $startmem > 10)
    104    $PASS = 0
    105    echo "growth: {$endmem-$startmem}"
    106    echo "kB/loop: {($endmem-$startmem)/10000}"
    107  end
    108 
    109 end
    110 
    111 # Memory test for list -x
    112 macro memtest3
    113 
    114  local i
    115 
    116  list word -x "ps -p $PID -o rss"
    117  $startmem = $word:1
    118 
    119  for i 0 100
    120   list check3 -x "ls /etc"
    12196 end   
    12297 
     
    135110
    136111# Memory test for list -x
    137 # XXX these need to be cleaned up to use the actual
    138 # size of the list to calculate leakage...
     112macro memtest3
     113
     114 local i
     115
     116 list word -x "ps -p $PID -o rss"
     117 $startmem = $word:1
     118
     119 for i 0 1000
     120  list check3 -x "ls /dev/null"
     121 end   
     122 
     123 list word -x "ps -p $PID -o rss"
     124 $endmem = $word:1
     125
     126 $PASS = 1
     127
     128 if ($endmem - $startmem > 10)
     129   $PASS = 0
     130   echo "growth: {$endmem-$startmem}"
     131   echo "kB/loop: {($endmem-$startmem)/1000}"
     132 end
     133
     134end
     135
     136# Memory test for list -x
    139137macro memtest4
    140138
     
    155153 $startmem = $word:1
    156154
    157  for i 0 100
     155 for i 0 1000
    158156  list check4 -x "cat list_test.txt"
    159157 end   
Note: See TracChangeset for help on using the changeset viewer.