pmrep: fix archive end time reporting
[pcp.git] / qa / 392
blobe7c8a4cbd5f777b2bf7abde718716157e074060c
1 #! /bin/sh
2 # PCP QA Test No. 392
3 # Rebuild problems with duplicates and check irix.* and hw.* culling
4 # when -u used
6 # Since Rebuild is being enhanced for irix namespace stripping, the 'irix' names
7 # have been replaced with 'hpux' names to maintain the purpose of the test, but
8 # to prevent the unwanted translation from an irix namespace to non-irix.
9 # hpux was chosed since it is 'replaced' in the old and new Rebuilds.
11 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
14 seq=`basename $0`
15 echo "QA output created by $seq"
17 # get standard filters
18 . ./common.product
19 . ./common.filter
20 . ./common.check
22 status=1 # failure is the default!
23 trap "cd $here; rm -rf $tmp; exit \$status" 0 1 2 3 15
25 _filter()
27 sed -e '/^Rebuild/s/\/.*pmnsmerge/pmnsmerge/g'
30 _copy_Rebuild()
32 scr_src=$PCP_VAR_DIR/pmns/
33 cp $scr_src/Rebuild $1
34 if [ -f $scr_src/Xlate-irix-names ]
35 then
36 cp $scr_src/Xlate-irix-names $1
40 mkdir $tmp
41 cd $tmp
42 cat <<'End-of-File' >root.start
43 root {
45 hpux
46 foo
48 hw {
49 old_hw 1:44:0
50 both_hw 1:44:1
52 foo {
53 bar 1:2:0
55 hpux {
56 old_irix 1:10:0
57 both_irix 1:10:1
58 hub
60 hpux.hub {
61 nasid 1:44:8
63 End-of-File
65 cat <<'End-of-File' >root_irix
66 root {
68 hpux
70 hw {
71 both_hw 1:44:1
72 new_hw 1:44:2
73 hub
75 hw.hub {
76 nasid 1:44:8
78 hpux {
79 both_irix 1:10:1
80 new_irix 1:10:2
82 End-of-File
85 # Rebuild will write a message to SYSLOG when it fails,
86 # so write a message to SYSLOG that this is expected, and generated by QA
88 logger -p user.notice -t PCP "qa/$seq running ... expect SYSLOG entry from Rebuild failure"
90 _copy_Rebuild .
92 # real QA test starts here
94 echo "=== Rebuild ==="
95 rm -f root root.bin
96 cp root.start root
97 $sudo ./Rebuild | _filter
98 pminfo -m -n root
100 echo
101 echo "=== Rebuild -u ==="
102 rm -f root root.bin
103 cp root.start root
104 $sudo ./Rebuild -u | _filter
105 pminfo -m -n root
107 # success, all done
108 status=0
109 exit