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/261 | |
download | pcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/261')
-rwxr-xr-x | qa/261 | 91 |
1 files changed, 91 insertions, 0 deletions
@@ -0,0 +1,91 @@ +#! /bin/sh +# PCP QA Test No. 261 +# pmlogextract -S updates the label record? +# also exposed interp.c and pmval problems +# +# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved. +# + +seq=`basename $0` +echo "QA output created by $seq" + +# get standard filters +. ./common.product +. ./common.filter +. ./common.check + +rm -f $seq.out +if [ $PCP_VER -lt 3602 ] +then + ln $seq.out.1 $seq.out || exit 1 +elif [ $PCP_VER -lt 3809 ] +then + ln $seq.out.2 $seq.out || exit 1 +else + ln $seq.out.3 $seq.out || exit 1 +fi + +status=1 # failure is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +_filter() +{ + sed \ + -e '/^\[[0-9]* bytes]/d' +} + +echo >$seq.full + +# real QA test starts here +pmdumplog -z -l src/mirage +pmdumplog -z -a src/mirage 2>&1 >>$seq.full + +pmlogextract -S 5min -T 5min src/mirage $tmp + +echo "--- copyied archive ---" >>$seq.full +pmdumplog -z -a $tmp | tee -a $seq.full | _filter + +# Note on the bizarre 4.0001m termination intervals below ... +# Using _exactly_ 4m introduces a floating point arithmetic instability +# where the number of pmval samples could be 8 or 9 depending on how +# the compiler chooses to generate code (different gcc versions produce +# different answers) ... making it _slightly_ bigger avoids this problem +# +echo +echo "Check metrics using pmval ..." +for metric in sample.mirage +do + echo "$metric:" + pmval -z -t 30 -S @10:51:07.407 -T 4.0001min -a src/mirage -i m-00,m-21,m-22,m-23,m-24 $metric >$tmp.orig + pmval -z -t 30 -T 4.0001min -a $tmp -i m-00,m-21,m-22,m-23,m-24 $metric >$tmp.new + sed -e "s;$tmp;TMP;g" $tmp.new \ + | diff -c $tmp.orig - \ + | sed -e "s;$tmp;TMP;g" \ + -e '1,2s/ .*/ TODAY/' \ + -e 's/--- -/--- Standard Input/' + echo "--- $metric, src/mirage archive, instances" >>$seq.full + cat $tmp.orig >>$seq.full + echo "--- $metric, copied archive, instances" >>$seq.full + cat $tmp.new >>$seq.full +done + +echo +for metric in sample.bin sample.drift +do + echo "$metric:" + pmval -z -t 30 -S @10:51:07.407 -T 4.0001min -a src/mirage $metric >$tmp.orig + pmval -z -t 30 -T 4.0001min -a $tmp $metric >$tmp.new + sed -e "s;$tmp;TMP;g" $tmp.new \ + | diff -c $tmp.orig - \ + | sed -e "s;$tmp;TMP;g" \ + -e '1,2s/ .*/ TODAY/' \ + -e 's/--- -/--- Standard Input/' + echo "--- $metric, src/mirage archive, NO instances" >>$seq.full + cat $tmp.orig >>$seq.full + echo "--- $metric, copied archive, NO instances" >>$seq.full + cat $tmp.new >>$seq.full +done + +# success, all done +status=0 +exit |