forked from performancecopilot/pcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
032
executable file
·74 lines (61 loc) · 1.56 KB
/
032
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#! /bin/sh
# PCP QA Test No. 032
# exercise pmControlLog over the primary logger
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
# check-group-include: pmlc
#
seq=`basename $0`
echo "QA output created by $seq"
. ./common.product
. ./common.filter
. ./common.check
_echo()
{
echo ""
echo "+++" $* "+++"
}
_cleanup()
{
_restore_auto_restart pmcd
_restore_primary_logger
rm -f $tmp.*
exit $status
}
status=1
rm -f $seq.full
trap "_cleanup" 0 1 2 3 15
_stop_auto_restart pmcd
_service pcp stop | _filter_pcp_stop
_wait_pmcd_end
_writable_primary_logger
_service pmcd start 2>&1 | _filter_pcp_start
_wait_for_pmcd
_service pmlogger start 2>&1 | _filter_pcp_start
_wait_for_pmlogger
# real QA test starts here
_echo "expect this to be off"
src/logcontrol enquire sample.control
_echo "force these off"
src/logcontrol mandatory off sample.bin sampledso.colour
_echo "should fail to turn on"
src/logcontrol advisory on sampledso.colour
src/logcontrol -i bin-300 advisory on sample.bin
_echo "force these on"
src/logcontrol mandatory on sample.colour sampledso.bin
_echo "should fail to turn off"
src/logcontrol advisory off sampledso.bin
src/logcontrol -i red advisory off sample.colour
_echo "allow advisory control over this one"
src/logcontrol mandatory maybe sample.lights
_echo "turn it on"
src/logcontrol advisory on sample.lights
_echo "turn it on again (NOP)"
src/logcontrol advisory on sample.lights
_echo "turn it off"
src/logcontrol advisory off sample.lights
_echo "turn it on"
src/logcontrol advisory on sample.lights
status=0
exit