Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 037
blobeed16f96eb8b37daab2d6740066d0d1d482c5855
1 #! /bin/sh
2 # PCP QA Test No. 037
3 # exercise meta-data services from an archive
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 filters
12 . ./common.product
13 . ./common.filter
15 # format of the line to match ...
16 # refcnt 2 vol 0 offset 132 (vol 0) serial 1 origin 804982618.523843 delta 5
18 _filter()
20 sed -e '/^refcnt/s/=/ /g' \
21 -e 's/tifd=[0-9]*/tifd=N/g' \
22 -e 's/mdfd=[0-9]*/mdfd=N/g' \
23 -e 's/mfd=[0-9]*/mfd=N/g' \
24 | $PCP_AWK_PROG '
25 $1 == "refcnt" && $11 == "origin" { if (t == 0) {
26 t = $12
27 $12 = "TIME"
29 else {
30 if (t == $12)
31 $12 = "SAME TIME"
32 else
33 $12 = "botch! " t "!=" $12
36 { print }'
39 trap "rm -f $tmp.*; exit" 0 1 2 3 15
41 # real QA test starts here
42 for arch in tmparch/foo tmparch/bar tmparch/mv-foo tmparch/mv-bar tmparch/noti-foo tmparch/noti-bar
44 echo
45 echo "Archive $arch"
46 src/xlog -v -a $arch | _filter | src/hex2nbo
47 done