3 # exercising the simple pmdas dynamic instance domain
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
16 status
=1 # failure is the default!
17 trap "_cleanup" 0 1 2 3 15
21 [ -f $iam.conf.
$seq ] && $sudo mv $iam.conf.
$seq $iam.conf
22 $sudo .
/Install
</dev
/null
>/dev
/null
2>&1
27 unset ROOT TOOLROOT MAKEFLAGS
32 -e 's/[0-9][0-9]*/[NUMBER]/g'
37 _filter_pmda_install \
39 -e 's/or python //g' \
44 # real QA test starts here
47 if [ ! -d $home/$iam ]
49 echo "Where is $home/$iam?"
55 $sudo mv $iam.conf
$iam.conf.
$seq
57 echo "sec,min,hour" >$tmp.conf
58 $sudo cp $tmp.conf
$home/$iam/$iam.conf
60 if $sudo $PCP_MAKE_PROG clobber
>$tmp.out
2>&1
65 echo "Arrgh, make clobber failed"
69 # start from a known starting point
70 $sudo .
/Remove
>/dev
/null
2>&1
72 $sudo .
/Install
-e </dev
/null
>$tmp.out
2>&1
73 _pmda_filter
<$tmp.out
75 # exercise various configuration file entries (updated on the fly) ...
77 cat > $tmp.test1
<< EOF
81 cat > $tmp.test2
<< EOF
84 # empty file (should fall back to previous config)
85 cat > $tmp.test3
<< EOF
87 # should just get hour
88 cat > $tmp.test4
<< EOF
92 # multiple entries the same ... should get just one instance returned
93 cat > $tmp.test5
<< EOF
97 # cp over prev config and then filter pminfo calls for each test
98 for test in $tmp.test1
$tmp.test2
$tmp.test3
$tmp.test4
$tmp.test5
100 $sudo cp $test $home/$iam/$iam.conf
103 pminfo
-f simple.now | _time_filter
104 $sudo rm -f $home/$iam/$iam.conf
106 $sudo cp $tmp.conf
$home/$iam/$iam.conf
109 $sudo .
/Remove
>$tmp.out
2>&1
110 _pmda_filter
<$tmp.out