3 .\" The DragonFly Project. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in
13 .\" the documentation and/or other materials provided with the
15 .\" 3. Neither the name of The DragonFly Project nor the names of its
16 .\" contributors may be used to endorse or promote products derived
17 .\" from this software without specific, prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 .Nd kernel test bridge for dfregress
47 .Fn tbridge_rpintf "const char *fmt" "..."
49 .Fn tbridge_test_done "int result"
52 .Fn TBRIDGE_TESTCASE_MODULE "name" "struct tbridge_testcase *testcase"
56 .Dv RESULT_SIGNALLED ,
64 .Fn tbridge_abort_t ""
66 .Fn tbridge_run_t "void *"
68 To create a new kernel testcase
70 the following is required:
72 TBRIDGE_TESTCASE_MODULE(testfoo, &testfoo_case);
74 struct tbridge_testcase testfoo_case = {
75 .tb_run = testfoo_run,
77 /* The following are optional */
78 .tb_abort = testfoo_abort
84 callback is called from a separate kernel thread to start testcase
89 callback is optional, but highly recommended.
90 It is called whenever a testcase execution times out, so that the
91 testcase can clean up and abort all running tasks, if possible.
92 If this is not applicable to your thread because it is impossible
97 .Fn TBRIDGE_TESTCASE_MODULE
100 testcase kernel module.
102 is a structure of type
103 .Ft struct tbridge_testcase ,
108 function acts as a kprintf replacement that will log all the output
109 into the testcase metadata that is passed back to userland upon completion.
110 Its syntax is equivalent to that of
114 .Fn tbridge_test_done
115 function should be called whenever a result for the testcase is available.
118 should be set to one of the
126 module first appeared in
131 module was written by