xref: /onnv-gate/usr/src/lib/fm/libdiagcode/common/tests/SAMPLE0.dict (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#
2*0Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3*0Sstevel@tonic-gate# Use is subject to license terms.
4*0Sstevel@tonic-gate#
5*0Sstevel@tonic-gate# CDDL HEADER START
6*0Sstevel@tonic-gate#
7*0Sstevel@tonic-gate# The contents of this file are subject to the terms of the
8*0Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
9*0Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
10*0Sstevel@tonic-gate# with the License.
11*0Sstevel@tonic-gate#
12*0Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13*0Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
14*0Sstevel@tonic-gate# See the License for the specific language governing permissions
15*0Sstevel@tonic-gate# and limitations under the License.
16*0Sstevel@tonic-gate#
17*0Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
18*0Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19*0Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
20*0Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
21*0Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
22*0Sstevel@tonic-gate#
23*0Sstevel@tonic-gate# CDDL HEADER END
24*0Sstevel@tonic-gate#
25*0Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
26*0Sstevel@tonic-gate#
27*0Sstevel@tonic-gate#
28*0Sstevel@tonic-gate# SAMPLE0 diagcode dictionary -- used by "make test" target only
29*0Sstevel@tonic-gate#
30*0Sstevel@tonic-gate# this sample dictionary tests code type 0, the smallest type,
31*0Sstevel@tonic-gate# since the bits required to hold the value is less than 22.
32*0Sstevel@tonic-gate#
33*0Sstevel@tonic-gateFMDICT: name=SAMPLE0 idname=Hello version=1 maxkey=5
34*0Sstevel@tonic-gate#
35*0Sstevel@tonic-gate# here's a worked by hand example for key: "fault.one fault.two"
36*0Sstevel@tonic-gate#
37*0Sstevel@tonic-gate#   Dictname: "SAMPLE0"
38*0Sstevel@tonic-gate#    Dictval: 5: below 2^21-1
39*0Sstevel@tonic-gate#   Format 0: DICT-XXXX-XX
40*0Sstevel@tonic-gate#              2 bits code type
41*0Sstevel@tonic-gate#              2 bits size
42*0Sstevel@tonic-gate#             21 bits dictval
43*0Sstevel@tonic-gate#              8 bits checksum
44*0Sstevel@tonic-gate#  Code type: 01
45*0Sstevel@tonic-gate#  Code size: 00
46*0Sstevel@tonic-gate#    Dictval: 000000000000000000101
47*0Sstevel@tonic-gate#   Checksum: 11100
48*0Sstevel@tonic-gate#  Converted:
49*0Sstevel@tonic-gate#             01000 = 8
50*0Sstevel@tonic-gate#             00000 = 0
51*0Sstevel@tonic-gate#             00000 = 0
52*0Sstevel@tonic-gate#             00000 = 0
53*0Sstevel@tonic-gate#             00101 = 5
54*0Sstevel@tonic-gate#             11100 = V
55*0Sstevel@tonic-gate#SUNW-MSG-ID: SAMPLE0-8000-5V
56*0Sstevel@tonic-gate#
57*0Sstevel@tonic-gate# test of minor versioning: the string below should be ignored
58*0Sstevel@tonic-gatefault.one fault.three fault.two=2 "this is all three faults"
59*0Sstevel@tonic-gatefault.one fault.three=1
60*0Sstevel@tonic-gatefault.one=7
61*0Sstevel@tonic-gatefault.two=6
62*0Sstevel@tonic-gatefault.one fault.two=5
63*0Sstevel@tonic-gatefault.three=4
64*0Sstevel@tonic-gatefault.three fault.two=3
65*0Sstevel@tonic-gate#
66*0Sstevel@tonic-gate#TEST:open:0
67*0Sstevel@tonic-gate#TEST:codelen:0:32
68*0Sstevel@tonic-gate#TEST:getprop:0:name:SAMPLE0
69*0Sstevel@tonic-gate#TEST:getprop:0:version:1
70*0Sstevel@tonic-gate#TEST:getprop:0:maxkey:5
71*0Sstevel@tonic-gate#TEST:getprop:0:idname:Hello
72*0Sstevel@tonic-gate#TEST:key2code:0:fault.two fault.one:SAMPLE0-8000-5V
73*0Sstevel@tonic-gate#TEST:key2code:0:fault.one fault.two:SAMPLE0-8000-5V
74*0Sstevel@tonic-gate#TEST:key2code:0:fault.one fault.two fault.one:SAMPLE0-8000-5V
75*0Sstevel@tonic-gate#TEST:key2code:0:fault.one fault.two fault.one fault.one fault.two:SAMPLE0-8000-5V
76*0Sstevel@tonic-gate#TEST:key2code:ENOMSG:fault.one fault.poop
77*0Sstevel@tonic-gate#TEST:close
78*0Sstevel@tonic-gate#TEST:open:0
79*0Sstevel@tonic-gate#TEST:maxkey:0:6
80*0Sstevel@tonic-gate#TEST:code2key:EINVAL:SAMPLE0-7000-5S:fault.one fault.two
81*0Sstevel@tonic-gate#TEST:code2key:EINVAL:SAMPLE0-8010-5S:fault.one fault.two
82*0Sstevel@tonic-gate#TEST:code2key:EINVAL:SAMPLE0-8000-5T:fault.one fault.two
83*0Sstevel@tonic-gate#TEST:code2key:EINVAL:SAMPLE0-8000-S5:fault.one fault.two
84*0Sstevel@tonic-gate#TEST:code2key:EINVAL:SAMPLE0-0800-5S:fault.one fault.two
85*0Sstevel@tonic-gate#TEST:code2key:0:SAMPLE0-8000-5V:fault.one fault.two
86*0Sstevel@tonic-gate#TEST:close
87*0Sstevel@tonic-gate#
88