#! /bin/sh # PCP QA Test No. 617 # exercise PCP dbpmda interface # # Copyright (c) 2013 Red Hat. # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved. # seq=`basename $0` echo "QA output created by $seq" # get standard environment, filters and checks . ./common.filter . ./common.check . ./common.product . ./localconfig rm -f $seq.out if [ $PCP_VER -ge 3801 ] then ln $seq.out.3 $seq.out || exit 1 elif [ $PCP_VER -ge 3800 ] then ln $seq.out.2 $seq.out || exit 1 elif [ $PCP_VER -gt 2200 ] then ln $seq.out.1 $seq.out || exit 1 else _notrun "dbpmda interface test, requires more recent dbpmda" fi if [ $PCP_PLATFORM = linux -o $PCP_PLATFORM = solaris ] then PMDADSO=$PCP_PMDAS_DIR/sample/pmda_sample.so elif [ $PCP_PLATFORM = darwin ] then PMDADSO=$PCP_PMDAS_DIR/sample/pmda_sample.dylib else echo "Arrgh ... need customization for $PCP_PLATFORM" exit 1 fi export PMDADSO status=1 # failure is the default! trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 _filter() { sed \ -e "s;$PMDADSO;PMDADSO;" \ -e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;" \ -e 's;pcp/lib/mips_[^.]*\.;pcp/lib/ISA.;' \ -e 's/parse error/Syntax error/' \ -e 's/syntax error/Syntax error/' \ -e '/^dbpmda> $/d' \ -e '/pmResult/s/0x[^ ]*/ADDR/g' \ -e '/DSO Interface Version: /s/[5-9]/N/g' \ -e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]/TIMEZONE/g' \ -e 's/Permission denied/No permission to perform requested operation/' \ -e '/Error PDU/s/One-line/Oneline/' # last sed substitution thanks to pv:937345 which changed the wording # ... preserving the old form so QA passes } # real QA test starts here $sudo dbpmda -ie 2>&1 <