Drop unused condition check
[pcp.git] / qa / 580
blob10e6692d014975aeb7a52b4ba6854cf4878d98fb
1 #! /bin/sh
2 # PCP QA Test No. 580
3 # Compare pmGetInDom and pmNameIndom for instance names containing spaces
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 rm -f $seq.out
17 case $PCP_PLATFORM
19 linux)
20 # proc metrics may not be available
22 if pminfo proc.nprocs >/dev/null 2>&1
23 then
24 ln $seq.out.$PCP_PLATFORM $seq.out || exit 1
25 else
26 ln $seq.out.$PCP_PLATFORM.noproc $seq.out || exit 1
29 darwin)
30 ln $seq.out.$PCP_PLATFORM $seq.out || exit 1
32 solaris)
33 # same output for Mac OS X and OpenSolaris
34 ln $seq.out.darwin $seq.out || exit 1
37 _notrun "Need qualified output for $PCP_PLATFORM"
39 esac
41 # see if unix domain sockets are available (permissions)
42 _get_libpcp_config
43 target="-h localhost"
44 $unix_domain_sockets && target="-h unix:"
46 status=1 # failure is the default!
47 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
49 _filter()
51 sed -e 's/ *$//'
54 # real QA test starts here
55 src/indom -i 15 kernel.all.load | _filter
56 if [ $PCP_PLATFORM != darwin -a $PCP_PLATFORM != solaris ]
57 then
58 src/indom $target -i 1 proc.psinfo.pid \
59 | _filter \
60 | sed 's/<0*1/<ONE/g;
61 s,/etc/init ,init,g;
62 s,/etc/init,init,g;
63 s,/sbin/init,init,g;
64 s, /usr/lib/systemd/systemd\([ ">]\), init\1,;
65 s,init[^>]*,init,g;'
66 # Irix 6.2 has a space after the init, linux may have extra arguments
67 # And on some Linux systems (e.g. Fedora 18), pid 1 is not init, but
68 # /usr/lib/systemd/systemd --switched-root --system --deserialize ...
70 src/indom -i 4 sample.needprofile sampledso.needprofile | _filter
71 src/indom -i 500 sample.bin | _filter
73 # success, all done
74 status=0
75 exit