1f08c3bdfSopenharmony_ci/******************************************************************************/
2f08c3bdfSopenharmony_ci/*                                                                            */
3f08c3bdfSopenharmony_ci/* Copyright (c) International Business Machines  Corp., 2007                 */
4f08c3bdfSopenharmony_ci/*                                                                            */
5f08c3bdfSopenharmony_ci/* This program is free software;  you can redistribute it and/or modify      */
6f08c3bdfSopenharmony_ci/* it under the terms of the GNU General Public License as published by       */
7f08c3bdfSopenharmony_ci/* the Free Software Foundation; either version 2 of the License, or          */
8f08c3bdfSopenharmony_ci/* (at your option) any later version.                                        */
9f08c3bdfSopenharmony_ci/*                                                                            */
10f08c3bdfSopenharmony_ci/* This program is distributed in the hope that it will be useful,            */
11f08c3bdfSopenharmony_ci/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
12f08c3bdfSopenharmony_ci/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
13f08c3bdfSopenharmony_ci/* the GNU General Public License for more details.                           */
14f08c3bdfSopenharmony_ci/*                                                                            */
15f08c3bdfSopenharmony_ci/* You should have received a copy of the GNU General Public License          */
16f08c3bdfSopenharmony_ci/* along with this program;  if not, write to the Free Software               */
17f08c3bdfSopenharmony_ci/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    */
18f08c3bdfSopenharmony_ci/*                                                                            */
19f08c3bdfSopenharmony_ci/******************************************************************************/
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_cirealtime tests is an open-source testsuite for testing real-time Linux.  It is
22f08c3bdfSopenharmony_cilicensed under the GPL.  The latest version of this testsuite is available
23f08c3bdfSopenharmony_cifrom http://rt.wiki.kernel.org.  This testsuite is maintained by the IBM
24f08c3bdfSopenharmony_ciReal-Time team.  Please send bug reports, contributions, questions to
25f08c3bdfSopenharmony_cithe discussion list also available at: http://rt.wiki.kernel.org.
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ciThe testsuite contains some functional tests and a few performance
28f08c3bdfSopenharmony_ciand latency measurement tests.  This is still a work in (early) progress!
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci
31f08c3bdfSopenharmony_ciDEPENDENCIES
32f08c3bdfSopenharmony_ci============
33f08c3bdfSopenharmony_ciThe testsuite expects glibc ("C" library) (version 2.4 onwards) and
34f08c3bdfSopenharmony_cithe underlying kernel (version 2.6.18 onwards) to support
35f08c3bdfSopenharmony_ciRobust and Priority Inheritance (PI) Mutexes.
36f08c3bdfSopenharmony_ci
37f08c3bdfSopenharmony_ciMost of the tests need the user to have a privileges that allow
38f08c3bdfSopenharmony_cihim/her to create SCHED_FIFO threads of priorities upto 99
39f08c3bdfSopenharmony_ci
40f08c3bdfSopenharmony_ciRUNNING TESTS THROUGH LTP
41f08c3bdfSopenharmony_ci=========================
42f08c3bdfSopenharmony_ciSimplest method to run realtime tests through LTP is:
43f08c3bdfSopenharmony_ciThe command will configure,build and run tests specified through
44f08c3bdfSopenharmony_ciargument provided to the script.
45f08c3bdfSopenharmony_ci
46f08c3bdfSopenharmony_ciRun command below from LTP root directory with argument:
47f08c3bdfSopenharmony_ci
48f08c3bdfSopenharmony_ci        $./testscripts/test_realtime.sh -t $arg
49f08c3bdfSopenharmony_ci
50f08c3bdfSopenharmony_ci        or
51f08c3bdfSopenharmony_ci
52f08c3bdfSopenharmony_ci        $./test_realtime.sh -t $arg   # From $LTPROOT/testscripts directory
53f08c3bdfSopenharmony_ci
54f08c3bdfSopenharmony_ciHere $arg takes values as :
55f08c3bdfSopenharmony_ci
56f08c3bdfSopenharmony_ci        func =        all functional tests will be run "
57f08c3bdfSopenharmony_ci        stress =      all stress tests will be run "
58f08c3bdfSopenharmony_ci        perf =        all perf tests will be run "
59f08c3bdfSopenharmony_ci        all =         all tests will be run "
60f08c3bdfSopenharmony_ci        list =        all available tests will be listed "
61f08c3bdfSopenharmony_ci        clean =       all logs deleted, make clean performed "
62f08c3bdfSopenharmony_ci        test_name =   only test_name subdir will be run (e.g: func/pi-tests) "
63f08c3bdfSopenharmony_ci
64f08c3bdfSopenharmony_ci
65f08c3bdfSopenharmony_ciBUILD
66f08c3bdfSopenharmony_ci=====
67f08c3bdfSopenharmony_ciTo build the tests execute the following command:
68f08c3bdfSopenharmony_ci
69f08c3bdfSopenharmony_ci		$make
70f08c3bdfSopenharmony_ci
71f08c3bdfSopenharmony_ci
72f08c3bdfSopenharmony_ciRUNNING THE TESTS
73f08c3bdfSopenharmony_ci==================
74f08c3bdfSopenharmony_ciThe top level script run.sh can be used to invoke all or a subset of tests.
75f08c3bdfSopenharmony_ci
76f08c3bdfSopenharmony_ci1. Running the script with no arguments will list usage:
77f08c3bdfSopenharmony_ci
78f08c3bdfSopenharmony_ci		$run.sh
79f08c3bdfSopenharmony_ci
80f08c3bdfSopenharmony_ci
81f08c3bdfSopenharmony_ci2. Running the script with the list option will list the available tests.
82f08c3bdfSopenharmony_ci
83f08c3bdfSopenharmony_ci		$run.sh -t list
84f08c3bdfSopenharmony_ci
85f08c3bdfSopenharmony_ci   Note that the tests available are determined by the presence
86f08c3bdfSopenharmony_ci   of a local script run_auto.sh in the individual test subdirectories
87f08c3bdfSopenharmony_ci   at this time.
88f08c3bdfSopenharmony_ci
89f08c3bdfSopenharmony_ci
90f08c3bdfSopenharmony_ci3. Individual tests can also be run. For example, to run the prio-wake tests
91f08c3bdfSopenharmony_ci   for 20 iterations:
92f08c3bdfSopenharmony_ci
93f08c3bdfSopenharmony_ci		$run.sh -t func/prio-wake -l 20
94f08c3bdfSopenharmony_ci
95f08c3bdfSopenharmony_ci   Note, the test must be specified with the path relative to the test
96f08c3bdfSopenharmony_ci   home (where run.sh lives).
97f08c3bdfSopenharmony_ci
98f08c3bdfSopenharmony_ci
99f08c3bdfSopenharmony_ci4. Alternatively, you can run the individual tests from their local directory.
100f08c3bdfSopenharmony_ci   For example, to run the prio-wake tests:
101f08c3bdfSopenharmony_ci
102f08c3bdfSopenharmony_ci		$cd func/prio-wake
103f08c3bdfSopenharmony_ci		$./run_auto.sh
104f08c3bdfSopenharmony_ci
105f08c3bdfSopenharmony_ci
106f08c3bdfSopenharmony_ci5. You can also run sets of tests:
107f08c3bdfSopenharmony_ci
108f08c3bdfSopenharmony_ci		$run.sh -t func
109f08c3bdfSopenharmony_ci
110f08c3bdfSopenharmony_ci        will run all the functional tests once
111f08c3bdfSopenharmony_ci
112f08c3bdfSopenharmony_ci		$run.sh -t perf -l 3
113f08c3bdfSopenharmony_ci
114f08c3bdfSopenharmony_ci        will run all the perf tests (if any!) thrice
115f08c3bdfSopenharmony_ci
116f08c3bdfSopenharmony_ci        Use the -h option to see the various arguments taken.
117f08c3bdfSopenharmony_ci
118f08c3bdfSopenharmony_ci6. Or you can run the binaries...
119f08c3bdfSopenharmony_ci
120f08c3bdfSopenharmony_ci
121f08c3bdfSopenharmony_ci
122f08c3bdfSopenharmony_ciRESULTS
123f08c3bdfSopenharmony_ci=======
124f08c3bdfSopenharmony_ciAll the automated run scripts set up logging in the logs/ directory.  Not all
125f08c3bdfSopenharmony_cithe tests have a clear PASS/FAIL outcome quite yet.  Work on parsing results
126f08c3bdfSopenharmony_ciis ongoing.
127f08c3bdfSopenharmony_ci
128