diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/160 | |
download | pcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/160')
-rwxr-xr-x | qa/160 | 57 |
1 files changed, 57 insertions, 0 deletions
@@ -0,0 +1,57 @@ +#! /bin/sh +# PCP QA Test No. 160 +# Exercise __pmSetClientId() +# +# Copyright (c) 2009 Ken McDonell. All Rights Reserved. +# + +seq=`basename $0` +echo "QA output created by $seq" + +# get standard environment, filters and checks +. ./common.product +. ./common.filter +. ./common.check + +status=0 # success is the default! +$sudo rm -rf $tmp.* +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 +rm -f $seq.full + +_filter() +{ + egrep 'QA-clientid|Error|__pmSetClientId' \ + | sed -e 's/value ".* QA/value "<host> QA/' \ + | sed -e 's/\[/[ /' -e 's/]/ ]/' \ + | awk ' +BEGIN { seq = 1 } +$1 == "inst" { if (seen[$3] == "") { + seen[$3] = "INST-" seq++ + } + $5 = "\"" seen[$3] "\"" + $3 = seen[$3] + } + { print }' \ + | LC_COLLATE=POSIX sort -u +} + +# real QA test starts here +src/clientid -l a bb ccc dddd eeeee ffffff ggggggg hhhhhhhh iiiiiiiii >$tmp.1 2>$tmp.2 & +pidlist="$pidlist $!" +sleep 2 +src/clientid -l foo-bar-mumble >$tmp.3 2>$tmp.4 & +pidlist="$pidlist $!" +sleep 2 +src/clientid -l "here is a longer string to go in the ident place holder to try things out that are not quite so short and boring" >$tmp.5 2>$tmp.6 & +pidlist="$pidlist $!" +sleep 2 + +kill -TERM $pidlist +wait + +cat $tmp.? \ +| tee $seq.full \ +| _filter + +# success, all done +exit |