~ubuntu-branches/ubuntu/feisty/dejagnu/feisty

« back to all changes in this revision

Viewing changes to doc/html/x134.html

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2004-02-09 15:07:58 UTC
  • Revision ID: james.westby@ubuntu.com-20040209150758-oaj7r5zrop60v8sb
Tags: upstream-1.4.4
ImportĀ upstreamĀ versionĀ 1.4.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 
2
<HTML
 
3
><HEAD
 
4
><TITLE
 
5
>A POSIX conforming test framework</TITLE
 
6
><META
 
7
NAME="GENERATOR"
 
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
 
9
"><LINK
 
10
REL="HOME"
 
11
TITLE="DejaGnu"
 
12
HREF="book1.html"><LINK
 
13
REL="UP"
 
14
TITLE="Overview"
 
15
HREF="c50.html"><LINK
 
16
REL="PREVIOUS"
 
17
TITLE="Design Goals"
 
18
HREF="x107.html"><LINK
 
19
REL="NEXT"
 
20
TITLE="Getting DejaGnu up and running"
 
21
HREF="c203.html"></HEAD
 
22
><BODY
 
23
CLASS="SECT1"
 
24
BGCOLOR="#FFFFFF"
 
25
TEXT="#000000"
 
26
LINK="#0000FF"
 
27
VLINK="#840084"
 
28
ALINK="#0000FF"
 
29
><DIV
 
30
CLASS="NAVHEADER"
 
31
><TABLE
 
32
SUMMARY="Header navigation table"
 
33
WIDTH="100%"
 
34
BORDER="0"
 
35
CELLPADDING="0"
 
36
CELLSPACING="0"
 
37
><TR
 
38
><TH
 
39
COLSPAN="3"
 
40
ALIGN="center"
 
41
>DejaGnu: The GNU Testing Framework</TH
 
42
></TR
 
43
><TR
 
44
><TD
 
45
WIDTH="10%"
 
46
ALIGN="left"
 
47
VALIGN="bottom"
 
48
><A
 
49
HREF="x107.html"
 
50
ACCESSKEY="P"
 
51
>&#60;&#60;&#60; Previous</A
 
52
></TD
 
53
><TD
 
54
WIDTH="80%"
 
55
ALIGN="center"
 
56
VALIGN="bottom"
 
57
>Overview</TD
 
58
><TD
 
59
WIDTH="10%"
 
60
ALIGN="right"
 
61
VALIGN="bottom"
 
62
><A
 
63
HREF="c203.html"
 
64
ACCESSKEY="N"
 
65
>Next &#62;&#62;&#62;</A
 
66
></TD
 
67
></TR
 
68
></TABLE
 
69
><HR
 
70
ALIGN="LEFT"
 
71
WIDTH="100%"></DIV
 
72
><DIV
 
73
CLASS="SECT1"
 
74
><H1
 
75
CLASS="SECT1"
 
76
><A
 
77
NAME="POSIX"
 
78
></A
 
79
>A POSIX conforming test framework</H1
 
80
><P
 
81
>DejaGnu conforms to the POSIX 1003.3 standard for test
 
82
      frameworks. Rob Savoye was a member of that committee.</P
 
83
><P
 
84
>The POSIX standard 1003.3 defines what a testing framework needs to
 
85
      provide, in order to permit the creation of POSIX conformance test
 
86
      suites. This standard is primarily oriented to running POSIX conformance
 
87
      tests, but its requirements also support testing of features not related
 
88
      to POSIX conformance.  POSIX 1003.3 does not specify a particular testing
 
89
      framework, but at this time there is only one other POSIX conforming test
 
90
      framework: TET. TET was created by Unisoft for a consortium comprised of
 
91
      X/Open, Unix International and the Open Software Foundation.</P
 
92
><P
 
93
>The POSIX documentation refers to <I
 
94
CLASS="FIRSTTERM"
 
95
>assertions</I
 
96
>.
 
97
      An assertion is a description of behavior.  For example, if a standard
 
98
      says ``The sun shall shine'', a corresponding assertion might be ``The
 
99
      sun is shining.''  A test based on this assertion would pass or fail
 
100
      depending on whether it is day or night.  It is important to note
 
101
      that the standard being tested is never 1003.3; the standard being tested
 
102
      is some other standard, for which the assertions were written.</P
 
103
><P
 
104
>As there is no testsuite to test testing frameworks for POSIX
 
105
      1003.3 conformance, verifying conformance to this standard is done by
 
106
      repeatedly reading the standard and experimenting.  One of the main
 
107
      things 1003.3 does specify is the set of allowed output messages and
 
108
      their definitions.  Four messages are supported for a required feature of
 
109
      POSIX conforming systems and a fifth for a conditional feature. DejaGnu
 
110
      supports the use of all five output messages.  In this sense a testsuite
 
111
      that uses exactly these messages can be considered POSIX conforming.
 
112
      These definitions specify the output of a test
 
113
      case:</P
 
114
><P
 
115
></P
 
116
><DIV
 
117
CLASS="VARIABLELIST"
 
118
><DL
 
119
><DT
 
120
>PASS</DT
 
121
><DD
 
122
><P
 
123
>A test has succeeded.  That is, it demonstrated that
 
124
          the assertion is true.</P
 
125
></DD
 
126
><DT
 
127
>XFAIL</DT
 
128
><DD
 
129
><P
 
130
>POSIX 1003.3 does not incorporate the notion of
 
131
          expected failures, so <I
 
132
CLASS="EMPHASIS"
 
133
>PASS</I
 
134
>, instead of
 
135
          <I
 
136
CLASS="EMPHASIS"
 
137
>XPASS</I
 
138
>, must also be returned for test cases
 
139
          which were expected to fail and did not.  This means that
 
140
          <I
 
141
CLASS="EMPHASIS"
 
142
>PASS</I
 
143
> is in some sense more ambiguous than if
 
144
          <I
 
145
CLASS="EMPHASIS"
 
146
>XPASS</I
 
147
> is also used.</P
 
148
></DD
 
149
><DT
 
150
>FAIL</DT
 
151
><DD
 
152
><P
 
153
>A test has produced the bug it was intended to
 
154
          capture.  That is, it has demonstrated that the assertion is false.
 
155
          The <I
 
156
CLASS="EMPHASIS"
 
157
>FAIL</I
 
158
> message is based on the test case only.
 
159
          Other messages are used to indicate a failure of the framework. As
 
160
          with <I
 
161
CLASS="EMPHASIS"
 
162
>PASS</I
 
163
>, POSIX tests must return
 
164
          <I
 
165
CLASS="EMPHASIS"
 
166
>FAIL</I
 
167
> rather than <I
 
168
CLASS="EMPHASIS"
 
169
>XFAIL</I
 
170
> even
 
171
          if a failure was expected.</P
 
172
></DD
 
173
><DT
 
174
>UNRESOLVED</DT
 
175
><DD
 
176
><P
 
177
>A test produced indeterminate results.  Usually, this
 
178
          means the test executed in an unexpected fashion; this outcome
 
179
          requires that a human being go over results, to determine if the test
 
180
          should have passed or failed.  This message is also used for any test
 
181
          that requires human intervention because it is beyond the abilities
 
182
          of the testing framework.  Any unresolved test should resolved to
 
183
          <I
 
184
CLASS="EMPHASIS"
 
185
>PASS</I
 
186
> or <I
 
187
CLASS="EMPHASIS"
 
188
>FAIL</I
 
189
> before a test
 
190
          run can be considered finished.</P
 
191
><P
 
192
>Note that for POSIX, each assertion must produce a test result
 
193
          code.  If the test isn't actually run, it must produce
 
194
          <I
 
195
CLASS="EMPHASIS"
 
196
>UNRESOLVED</I
 
197
> rather than just leaving that test
 
198
          out of the output.  This means that you have to be careful when
 
199
          writing tests to not carelessly use Tcl commands like
 
200
          <I
 
201
CLASS="EMPHASIS"
 
202
>return</I
 
203
>---if you alter the flow of control of the
 
204
          Tcl code you must insure that every test still produces some result
 
205
          code.</P
 
206
><P
 
207
>Here are some of the ways a test may wind up
 
208
          <I
 
209
CLASS="EMPHASIS"
 
210
>UNRESOLVED</I
 
211
>:</P
 
212
></DD
 
213
></DL
 
214
></DIV
 
215
><P
 
216
></P
 
217
><UL
 
218
><LI
 
219
STYLE="list-style-type: disc"
 
220
><P
 
221
>A test's execution is
 
222
            interrupted.</P
 
223
></LI
 
224
><LI
 
225
STYLE="list-style-type: disc"
 
226
><P
 
227
>A test does not produce a clear
 
228
            result. This is usually because there was an
 
229
            <I
 
230
CLASS="EMPHASIS"
 
231
>ERROR</I
 
232
> from DejaGnu while processing
 
233
            the test, or because there were three or more
 
234
            <I
 
235
CLASS="EMPHASIS"
 
236
>WARNING</I
 
237
> messages. Any
 
238
            <I
 
239
CLASS="EMPHASIS"
 
240
>WARNING</I
 
241
> or <I
 
242
CLASS="EMPHASIS"
 
243
>ERROR</I
 
244
>
 
245
            messages can invalidate the output of the test.  This
 
246
            usually requires a human being to examine the output to
 
247
            determine what really happened---and to improve the test
 
248
            case.</P
 
249
></LI
 
250
><LI
 
251
STYLE="list-style-type: disc"
 
252
><P
 
253
>A test depends on a previous test, which
 
254
            fails.</P
 
255
></LI
 
256
><LI
 
257
STYLE="list-style-type: disc"
 
258
><P
 
259
>The test was set up
 
260
            incorrectly.</P
 
261
></LI
 
262
></UL
 
263
><P
 
264
></P
 
265
><DIV
 
266
CLASS="VARIABLELIST"
 
267
><DL
 
268
><DT
 
269
>UNTESTED</DT
 
270
><DD
 
271
><P
 
272
>A test was not run.  This is a place-holder, used
 
273
            when there is no real test case yet.</P
 
274
></DD
 
275
></DL
 
276
></DIV
 
277
><P
 
278
>The only remaining output message left is intended to test
 
279
          features that are specified by the applicable POSIX standard as
 
280
          conditional:</P
 
281
><P
 
282
></P
 
283
><DIV
 
284
CLASS="VARIABLELIST"
 
285
><DL
 
286
><DT
 
287
>UNSUPPORTED</DT
 
288
><DD
 
289
><P
 
290
>There is no support for the tested case.  This may
 
291
            mean that a conditional feature of an operating system, or of a
 
292
            compiler, is not implemented.  DejaGnu also uses this message when
 
293
            a testing environment (often a ``bare board'' target) lacks basic
 
294
            support for compiling or running the test case.  For example, a
 
295
            test for the system subroutine <I
 
296
CLASS="EMPHASIS"
 
297
>gethostname</I
 
298
>
 
299
            would never work on a target board running only a boot
 
300
            monitor.</P
 
301
></DD
 
302
></DL
 
303
></DIV
 
304
><P
 
305
>DejaGnu uses the same output procedures to produce these messages
 
306
        for all testsuites and these procedures are already known to conform
 
307
        to POSIX 1003.3.  For a DejaGnu testsuite to conform to POSIX 1003.3,
 
308
        you must avoid the <I
 
309
CLASS="EMPHASIS"
 
310
>setup</I
 
311
>xfail} procedure as
 
312
        described in the <I
 
313
CLASS="EMPHASIS"
 
314
>PASS</I
 
315
> section above and you must
 
316
        be careful to return <I
 
317
CLASS="EMPHASIS"
 
318
>UNRESOLVED</I
 
319
> where appropriate,
 
320
        as described in the <I
 
321
CLASS="EMPHASIS"
 
322
>UNRESOLVED</I
 
323
> section
 
324
        above.</P
 
325
></DIV
 
326
><DIV
 
327
CLASS="NAVFOOTER"
 
328
><HR
 
329
ALIGN="LEFT"
 
330
WIDTH="100%"><TABLE
 
331
SUMMARY="Footer navigation table"
 
332
WIDTH="100%"
 
333
BORDER="0"
 
334
CELLPADDING="0"
 
335
CELLSPACING="0"
 
336
><TR
 
337
><TD
 
338
WIDTH="33%"
 
339
ALIGN="left"
 
340
VALIGN="top"
 
341
><A
 
342
HREF="x107.html"
 
343
ACCESSKEY="P"
 
344
>&#60;&#60;&#60; Previous</A
 
345
></TD
 
346
><TD
 
347
WIDTH="34%"
 
348
ALIGN="center"
 
349
VALIGN="top"
 
350
><A
 
351
HREF="book1.html"
 
352
ACCESSKEY="H"
 
353
>Home</A
 
354
></TD
 
355
><TD
 
356
WIDTH="33%"
 
357
ALIGN="right"
 
358
VALIGN="top"
 
359
><A
 
360
HREF="c203.html"
 
361
ACCESSKEY="N"
 
362
>Next &#62;&#62;&#62;</A
 
363
></TD
 
364
></TR
 
365
><TR
 
366
><TD
 
367
WIDTH="33%"
 
368
ALIGN="left"
 
369
VALIGN="top"
 
370
>Design Goals</TD
 
371
><TD
 
372
WIDTH="34%"
 
373
ALIGN="center"
 
374
VALIGN="top"
 
375
><A
 
376
HREF="c50.html"
 
377
ACCESSKEY="U"
 
378
>Up</A
 
379
></TD
 
380
><TD
 
381
WIDTH="33%"
 
382
ALIGN="right"
 
383
VALIGN="top"
 
384
>Getting DejaGnu up and running</TD
 
385
></TR
 
386
></TABLE
 
387
></DIV
 
388
></BODY
 
389
></HTML
 
390
>
 
 
b'\\ No newline at end of file'