summaryrefslogtreecommitdiff
path: root/qa/861
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
commit47e6e7c84f008a53061e661f31ae96629bc694ef (patch)
tree648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/861
downloadpcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/861')
-rwxr-xr-xqa/86154
1 files changed, 54 insertions, 0 deletions
diff --git a/qa/861 b/qa/861
new file mode 100755
index 0000000..d3e6e65
--- /dev/null
+++ b/qa/861
@@ -0,0 +1,54 @@
+#!/bin/sh
+# PCP QA Test No. 861
+# Exercise custom pmcd hostname settings for clients needing
+# accurate (and/or custom) remote host name information.
+#
+# Copyright (c) 2013 Red Hat.
+#
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+# get standard environment, filters and checks
+. ./common.product
+. ./common.filter
+. ./common.check
+
+pminfo pmcd.hostname >/dev/null || _notrun "No support for pmcd.hostname metric"
+
+signal=$PCP_BINADM_DIR/pmsignal
+status=1 # failure is the default!
+$sudo rm -rf $tmp.* $seq.full
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ if [ -n "$pid" ]
+ then
+ echo "Terminating local pmcd process"
+ $signal -s TERM $pid
+ wait
+ pid=""
+ fi
+ cd $here; rm -rf $tmp.*
+}
+
+# real QA test starts here
+export PCP_PMCDCONF_PATH=$tmp.conf
+export PMCD_PORT=9876
+export PMCD_SOCKET=$tmp.pmcd.socket
+
+cat <<End-of-File >$tmp.conf
+pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so
+End-of-File
+pmcd -H nosuchhost.com -f -x $seq.full -l $tmp.log &
+pid=$!
+pmcd_wait
+
+echo "Checking custom pmcd.hostname setting from client side:"
+pminfo -dfm pmcd.hostname
+
+# success, all done
+status=0
+
+exit