zsh completions: minor tweaks
[pcp.git] / qa / 157
blob530efe64893738098d2bd07a337e81558fd3d860
1 #! /bin/sh
2 # PCP QA Test No. 157
3 # exercise the -u (unbuffered) option for pmlogger that was added
4 # for NASmgr
6 # Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 status=0 # success is the default!
18 $sudo rm -rf $tmp.*
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 rm -f $seq.full
23 # real QA test starts here
25 echo "log mandatory on default { sample.bucket }" \
26 | pmlogger -u -r -l $tmp.log -t 2sec -s 5 $tmp &
27 _wait_for_pmlogger $! $tmp.log
28 pmsleep 0.1
30 then=0
31 # expect pmlogger above to run for (5-1)*2sec
32 for i in 1 2 3 4 5 6 7 8 9 10
34 if [ -f $tmp.0 ]
35 then
36 now=`wc -c <$tmp.0 | sed -e 's/ //g'`
37 ls -l $tmp.0 >>$seq.full
38 echo "then=$then now=$now" >>$seq.full
39 if [ "$now" -ne "$then" ]
40 then
41 # expect this to happen 4 times
43 echo "size changed"
44 then=$now
47 sleep 1
48 done
50 cat $tmp.log >>$seq.full
52 exit