1 ========================================
2 TESTING FOR REQUIREMENTS IN TEST SCRIPTS
3 ========================================
5 Test scripts need to indicate to the infrastructure what sorts of requirements
6 they have. This is done with _require_<xxx> macros, which may take parameters.
8 (1) General requirements.
10 _require_command "$<NAME_PROG>" <name>
12 _require_test_program <name>
13 _require_xfs_io_command <name> [<switch>]
15 (2) System call requirements.
24 _require_command "$NAME_PROG" name
26 The test requires an external command, called 'name' be present on the
27 system and that '$VAR' should be set with the path to that command. $VAR
28 should then be used to refer to the command when executing it. For
31 _require_command "KILLALL_PROG" killall
33 to locate the killall command and then:
35 $KILLALL_PROG -q $FSSTRESS_PROG
42 The test requires that the block device specified by $TEST_DEV be mounted
46 _require_test_program <name>
48 The test requires a program by the name of 'name' be present and built in
49 the src/ directory. For example:
51 _require_test_program "stat_test"
53 requires that src/stat_test be built.
56 _require_xfs_io_command <name> [<switch>]
58 The test requires that the xfs_io command be available, that it supports
59 command <name> and, optionally, that that command supports the specified
62 _require_xfs_io_command "falloc"
63 _require_xfs_io_command "chattr" "+/-x"
65 The first requires that xfs_io support the falloc command and the second
66 that it supports the chattr command and that the chattr command supports
67 the +x and -x arguments (DAX attribute).
70 ========================
71 SYSTEM CALL REQUIREMENTS
72 ========================
76 The test requires the use of the statx() system call and will be skipped
77 if it isn't available in the kernel.