File: 008

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 (61 lines) | stat: -rwxr-xr-x 1,435 bytes parent folder | download | duplicates (4)
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
#! /bin/sh
# PCP QA Test No. 008
# exercise disk statistics on localhost
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc.  All Rights Reserved.
#
# NOTE
#	This test depends on the the local hostname and the disk configuration.
#	To generate a new validated output file ...
#		$ touch 008.out.`hostname | sed -e 's/\..*//'`
#		$ ./remake 008
#		$ mv 008.out 008.out.`hostname | sed -e 's/\..*//'`
#	and check that the comments and the output match up.
#
# :not_in_ci:
# 	As the output is host-specific and we have no control over the
# 	CI host configurations, don't bother running this one in CI
#

seq=`basename $0`
echo "QA output created by $seq"

# get standard filters
. ./common.product
. ./common.filter
. ./common.check

# need per-host checked in results
#
host=`hostname | sed -e 's/\..*//'`
rm -f $seq.out
case $host
in
    bozo)
    	# (CD drive) sdf comes and goes
	if pmprobe -I disk.dev.total | grep sdf >/dev/null
	then
	    ln $seq.out.bozo+cd $seq.out
	else
	    ln $seq.out.bozo $seq.out
	fi
	;;
    *)
	[ -f $seq.out.$host ] || \
	    _notrun "No qualified results file ($seq.out.$host) for the localhost"
	ln $seq.out.$host $seq.out
	;;
esac

trap "rm -f $tmp.*; exit" 0 1 2 3 15

PMCD_CONNECT_TIMEOUT=60
PMCD_REQUEST_TIMEOUT=60
export PMCD_CONNECT_TIMEOUT PMCD_REQUEST_TIMEOUT

src/disk_test \
| sed \
    -e '/pmResult/s/ .* numpmid/ ... numpmid/' \
    -e '/ value /s/ value .*/ value .../' \
| ./008.helper