1f08c3bdfSopenharmony_ciFunctional and Stress Tests:  Definition and Structure
2f08c3bdfSopenharmony_ci======================================================
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_ciThis document describes what functional and stress tests are, how they
5f08c3bdfSopenharmony_ciare created, and the structure that they follow in CVS.
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ciFunctional Test Definition
8f08c3bdfSopenharmony_ci--------------------------
9f08c3bdfSopenharmony_ci
10f08c3bdfSopenharmony_ciFunctional tests test the behavior of functional areas of the POSIX*
11f08c3bdfSopenharmony_cispecification.  They do not relate directly to lines in the POSIX
12f08c3bdfSopenharmony_cispecifications, but rather test that the overall behavior specified by
13f08c3bdfSopenharmony_cithe functional area is present.
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_ciStress Test Definition
16f08c3bdfSopenharmony_ci----------------------
17f08c3bdfSopenharmony_ci
18f08c3bdfSopenharmony_ciStress tests are designed to monitor how the system behaves when it is
19f08c3bdfSopenharmony_citaxed by excessively using the functional areas in the POSIX specification
20f08c3bdfSopenharmony_cior monitoring how the functional areas in the POSIX specification behave
21f08c3bdfSopenharmony_ciwhen the system is taxed.
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ciDirectory Structure
24f08c3bdfSopenharmony_ci-------------------
25f08c3bdfSopenharmony_ciFunctional and stress tests follow the same structure.
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ciThe functional/ and stress directories off of posixtestsuite are where the
28f08c3bdfSopenharmony_cifunctional and stress tests, respectively, are stored.
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ciEach of these are further subdivided into POSIX area (Timers, Semaphores,
31f08c3bdfSopenharmony_cietc.).  For example, functional/timers.
32f08c3bdfSopenharmony_ci
33f08c3bdfSopenharmony_ciWithin the functional/<POSIX area> directory, you should create the
34f08c3bdfSopenharmony_cifollowing files.
35f08c3bdfSopenharmony_ci- Makefile - master Makefile which will make all tests within the area
36f08c3bdfSopenharmony_ci
37f08c3bdfSopenharmony_ci- run.sh - file which will run all functional tests.  The run.sh can run
38f08c3bdfSopenharmony_ciconformance tests, functional tests from a different area (i.e.,
39f08c3bdfSopenharmony_cifunctional/threads/run.sh can call functional/timers/threadstests/test.c),
40f08c3bdfSopenharmony_cias well as functional tests in the current area.  If there are tests that
41f08c3bdfSopenharmony_ciapply to more than one area, they can go in either area and be called from
42f08c3bdfSopenharmony_cithe other if needed.
43f08c3bdfSopenharmony_ciAssume that the run.sh is called from the directory it is currently in
44f08c3bdfSopenharmony_ciwhen writing path names to files.
45f08c3bdfSopenharmony_ci
46f08c3bdfSopenharmony_ci- assertions.xml - This file maps test descriptions to test cases as in
47f08c3bdfSopenharmony_ciconformance tests.  The grammar for functional/stress tests is:
48f08c3bdfSopenharmony_ci<?xml version "1.0"?>
49f08c3bdfSopenharmony_ci<!DOCTYPE assertions [
50f08c3bdfSopenharmony_ci  <!ELEMENT assertion>
51f08c3bdfSopenharmony_ci  <!ATTLIST assertion
52f08c3bdfSopenharmony_ci      files  CDATA    #REQUIRED
53f08c3bdfSopenharmony_ci      tag    CDATA    #REQUIRED
54f08c3bdfSopenharmony_ci  >
55f08c3bdfSopenharmony_ci]>
56f08c3bdfSopenharmony_ciWhere the tag follows the same structure outlined in HOWTO_Assertions, and
57f08c3bdfSopenharmony_cithe files="..." field tags a comma delimited list of files which are
58f08c3bdfSopenharmony_ciused to test the assertion.  For example,
59f08c3bdfSopenharmony_ci  <assertion id="1" files="threadone,threadtwo,threadthree" tag="pt:THR">
60f08c3bdfSopenharmony_ci  Three threads can be run in parallel.
61f08c3bdfSopenharmony_ci  </assertion>
62f08c3bdfSopenharmony_ci
63f08c3bdfSopenharmony_ci- coverage.txt - This document contain information on the completion of
64f08c3bdfSopenharmony_citest cases for assertions as in the conformance tests.
65f08c3bdfSopenharmony_ciContent is lines with content:
66f08c3bdfSopenharmony_ci<assertion ID>		<YES/NO - for completed/not completed>
67f08c3bdfSopenharmony_ci
68f08c3bdfSopenharmony_ciSo long as the functional/stress tests follow these guidelines, they
69f08c3bdfSopenharmony_cican be built and run by the framework.  How the directory is subdivided
70f08c3bdfSopenharmony_ciis up to the area creator to define, but some suggestions have been:
71f08c3bdfSopenharmony_ci -  create directories corresponding to POSIX chapters (see .1-1990 or
72f08c3bdfSopenharmony_ci    .1-1996 specs)
73f08c3bdfSopenharmony_ci - create a number corresponding to the assertion ID for each directory
74f08c3bdfSopenharmony_ci
75f08c3bdfSopenharmony_ci* POSIX (R) is a registered trademark of the IEEE
76f08c3bdfSopenharmony_ci
77f08c3bdfSopenharmony_ciContributors:	julie.n.fleischer REMOVE-THIS AT intel DOT com
78f08c3bdfSopenharmony_ci                ajosey REMOVE-THIS AT rdg DOT opengroup DOT org
79f08c3bdfSopenharmony_ci                geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
80