File: 392

package info (click to toggle)
pcp 7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,748 kB
  • sloc: ansic: 1,483,656; sh: 182,366; xml: 160,462; cpp: 83,813; python: 24,980; perl: 18,327; yacc: 6,877; lex: 2,864; makefile: 2,738; awk: 165; fortran: 60; java: 52
file content (109 lines) | stat: -rwxr-xr-x 1,887 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#! /bin/sh
# PCP QA Test No. 392
# Rebuild problems with duplicates and check irix.* and hw.* culling
# when -u used
#
# Since Rebuild is being enhanced for irix namespace stripping, the 'irix' names 
# have been replaced with 'hpux' names to maintain the purpose of the test, but 
# to prevent the unwanted translation from an irix namespace to non-irix.
# hpux was chosed since it is 'replaced' in the old and new Rebuilds.
#
# 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

status=1	# failure is the default!
trap "cd $here; rm -rf $tmp; exit \$status" 0 1 2 3 15

_filter()
{
	sed -e '/^Rebuild/s/\/.*pmnsmerge/pmnsmerge/g'
}

_copy_Rebuild()
{
    scr_src=$PCP_VAR_DIR/pmns/
    cp $scr_src/Rebuild $1
    if [ -f $scr_src/Xlate-irix-names ]
    then
	cp $scr_src/Xlate-irix-names $1
    fi
}

mkdir $tmp
cd $tmp
cat <<'End-of-File' >root.start
root {
	hw
	hpux
	foo
}
hw {
	old_hw	1:44:0
	both_hw	1:44:1
}
foo {
	bar	1:2:0
}
hpux {
	old_irix 1:10:0
	both_irix 1:10:1
	hub
}
hpux.hub {
	nasid	1:44:8
}
End-of-File

cat <<'End-of-File' >root_irix
root {
	hw
	hpux
}
hw {
	both_hw	1:44:1
	new_hw	1:44:2
	hub
}
hw.hub {
	nasid	1:44:8
}
hpux {
	both_irix 1:10:1
	new_irix 1:10:2
}
End-of-File


# Rebuild will write a message to SYSLOG when it fails,
# so write a message to SYSLOG that this is expected, and generated by QA
#
logger -p user.notice -t PCP "qa/$seq running ... expect SYSLOG entry from Rebuild failure"

_copy_Rebuild .

# real QA test starts here
#
echo "=== Rebuild ==="
rm -f root root.bin
cp root.start root
$sudo ./Rebuild -o | _filter
pminfo -m -n root

echo
echo "=== Rebuild -u ==="
rm -f root root.bin
cp root.start root
$sudo ./Rebuild -o -u | _filter
pminfo -m -n root

# success, all done
status=0
exit