1f08c3bdfSopenharmony_ciSECTIONS:
2f08c3bdfSopenharmony_ci1. Overview
3f08c3bdfSopenharmony_ci2. Framework Functionality
4f08c3bdfSopenharmony_ci3. Building and Running the Tests
5f08c3bdfSopenharmony_ci
6f08c3bdfSopenharmony_ci1. Overview
7f08c3bdfSopenharmony_ci------------
8f08c3bdfSopenharmony_ciThis document describes how to run the tests in the POSIX Test Suite.
9f08c3bdfSopenharmony_ci
10f08c3bdfSopenharmony_ciOur framework currently has the ability to build and run conformance,
11f08c3bdfSopenharmony_cifunctional, and stress tests.  All tests are built with make all, but
12f08c3bdfSopenharmony_cicertain care should be used when running the stress test suite as the
13f08c3bdfSopenharmony_citests may leave the system in an indeterminate state.
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_ci2. Framework Functionality
16f08c3bdfSopenharmony_ci----------------------------------------------------
17f08c3bdfSopenharmony_ci
18f08c3bdfSopenharmony_ci  * Conformance Tests
19f08c3bdfSopenharmony_ciThe build and execution process varies for conformance tests.
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_ciFor definitions tests, the build and execution process is the same since
22f08c3bdfSopenharmony_cithe pass/fail criterion is determine by whether or not the test compiles.
23f08c3bdfSopenharmony_ciA definitions test will be compiled, not linked, by the toolchain.
24f08c3bdfSopenharmony_ci
25f08c3bdfSopenharmony_ciFor all other tests, they will have one test for the compile, one for the
26f08c3bdfSopenharmony_cilink, and one for the execution of the test.  Successful tests return
27f08c3bdfSopenharmony_ciPTS_PASS, which the interprets as success.  All other return values are
28f08c3bdfSopenharmony_ciconsidered failures [For more info, see HOWTO_ResultCodes].
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci  * Functional/Stress Tests
31f08c3bdfSopenharmony_ciFunctional and stress tests have their own Makefile and method for running,
32f08c3bdfSopenharmony_ciand the framework merely calls these mechanisms.  To build functional and
33f08c3bdfSopenharmony_cistress tests, the framework calls the main Makefile for each functional
34f08c3bdfSopenharmony_ciarea.  To run these tests, the framework calls the run.sh file for each
35f08c3bdfSopenharmony_cifunctional area.
36f08c3bdfSopenharmony_ci
37f08c3bdfSopenharmony_ci3. Building and Running the Tests
38f08c3bdfSopenharmony_ci----------------------------------
39f08c3bdfSopenharmony_ci
40f08c3bdfSopenharmony_ci** See the BUILD file for info on how to set up the build for the specific
41f08c3bdfSopenharmony_ciarea you are testing (threads, mqs, semaphores, etc.), as well as setup the
42f08c3bdfSopenharmony_cibuild specific to your environment.
43f08c3bdfSopenharmony_ci
44f08c3bdfSopenharmony_ciTo build and run the tests, you should be in the main posix test suite
45f08c3bdfSopenharmony_cidirectory.
46f08c3bdfSopenharmony_ci
47f08c3bdfSopenharmony_ciFrom there, execute:
48f08c3bdfSopenharmony_ci    # ./configure
49f08c3bdfSopenharmony_ci    # make all
50f08c3bdfSopenharmony_ci
51f08c3bdfSopenharmony_ciThis will build all of the conformance, functional, and stress tests.
52f08c3bdfSopenharmony_ci
53f08c3bdfSopenharmony_ciTo disable known failures on Linux do make filter-known-fails.
54f08c3bdfSopenharmony_ci
55f08c3bdfSopenharmony_ci* Conformance-specific items *
56f08c3bdfSopenharmony_ci
57f08c3bdfSopenharmony_ciTo run conformance tests for a specific directory, just cd to the directory
58f08c3bdfSopenharmony_ciand run make all test.
59f08c3bdfSopenharmony_ci
60f08c3bdfSopenharmony_ciExample:
61f08c3bdfSopenharmony_ci    # cd conformance/definitions/time_h ; make all test
62f08c3bdfSopenharmony_ci
63f08c3bdfSopenharmony_ciTo just build conformance tests, run:
64f08c3bdfSopenharmony_ci    # make conformance-all
65f08c3bdfSopenharmony_ci
66f08c3bdfSopenharmony_ciTo just run conformance tests, run:
67f08c3bdfSopenharmony_ci    # make conformance-test
68f08c3bdfSopenharmony_ci
69f08c3bdfSopenharmony_ci* Functional/Stress-specific items *
70f08c3bdfSopenharmony_ci
71f08c3bdfSopenharmony_ciTo run only functional tests, run:
72f08c3bdfSopenharmony_ci    # make functional-test
73f08c3bdfSopenharmony_ci
74f08c3bdfSopenharmony_ciTo run only stress tests, run:
75f08c3bdfSopenharmony_ci    # make stress-test
76f08c3bdfSopenharmony_ci
77f08c3bdfSopenharmony_ciTo make only functional tests, run:
78f08c3bdfSopenharmony_ci    # make functional-all
79f08c3bdfSopenharmony_ci
80f08c3bdfSopenharmony_ciTo make only stress tests, run:
81f08c3bdfSopenharmony_ci    # make stress-all
82f08c3bdfSopenharmony_ci
83f08c3bdfSopenharmony_ciTo skip known failures on Linux, run:
84f08c3bdfSopenharmony_ci    # make filter-known-fails
85f08c3bdfSopenharmony_ci    # make test
86f08c3bdfSopenharmony_ci
87f08c3bdfSopenharmony_ci4. Running POSIX Option Group Feature Tests
88f08c3bdfSopenharmony_ci-----------------------------------------------------
89f08c3bdfSopenharmony_ci
90f08c3bdfSopenharmony_ciThere are several POSIX option groups available that can be tested with this
91f08c3bdfSopenharmony_citest suite. The available groups are:
92f08c3bdfSopenharmony_ci
93f08c3bdfSopenharmony_ci	AIO	| Asynchonous I/O
94f08c3bdfSopenharmony_ci	MEM	| Memory
95f08c3bdfSopenharmony_ci	MSG	| IPC
96f08c3bdfSopenharmony_ci	SEM	| Semaphores
97f08c3bdfSopenharmony_ci	SIG	| Signals
98f08c3bdfSopenharmony_ci	THR	| Threading
99f08c3bdfSopenharmony_ci	TMR	| Timers
100f08c3bdfSopenharmony_ci	TPS	| Thread Execution Scheduling
101f08c3bdfSopenharmony_ci
102f08c3bdfSopenharmony_ciYou can run the tests by executing:
103f08c3bdfSopenharmony_ci
104f08c3bdfSopenharmony_ci	bin/run-posix-option-group-test.sh [OPTION-GROUP]
105f08c3bdfSopenharmony_ci
106f08c3bdfSopenharmony_cior run all of the tests by executing:
107f08c3bdfSopenharmony_ci
108f08c3bdfSopenharmony_ci	bin/run-all-posix-option-group-tests.sh
109f08c3bdfSopenharmony_ci
110f08c3bdfSopenharmony_ciMore details about these features can be found on the OpenGroup site
111f08c3bdfSopenharmony_ci(http://www.opengroup.org).
112f08c3bdfSopenharmony_ci
113f08c3bdfSopenharmony_ciContributors:	rusty.lynch REMOVE-THIS AT intel DOT com
114f08c3bdfSopenharmony_ci		julie.n.fleischer REMOVE-THIS AT intel DOT com
115f08c3bdfSopenharmony_ci		rolla.n.selbak REMOVE-THIS AT intel DOT com
116f08c3bdfSopenharmony_ci		yaneurabeya REMOVE-THIS AT gmail DOT com
117