fstests: remove libattr dependencies
[xfstests-dev.git] / doc / auxiliary-programs.txt
1                         ==============================
2                         AUXILIARY PROGRAMS FOR TESTING
3                         ==============================
4
5 Not everything a test script can do is easily done within a test script;
6 sometimes it makes a lot more sense to write auxiliary program in C and have
7 the test script call them.  Auxiliary commands can be found in the src/
8 directory and in other packages.
9
10 Tests wanting to use an auxiliary program found in the src/ directory should
11 note the dependency with:
12
13         _require_test_program "<program-name>"
14
15
16 Contents:
17
18  - af_unix              -- Create an AF_UNIX socket
19  - dmerror              -- fault injection block device control
20  - fsync-err            -- tests fsync error reporting after failed writeback
21  - log-writes/replay-log -- Replay log from device mapper log-writes target
22  - open_by_handle       -- open_by_handle_at syscall exercise
23  - stat_test            -- statx syscall exercise
24  - t_dir_type           -- print directory entries and their file type
25  - xfs_io               -- General I/O operation exercise
26
27
28 ==================
29 QUICK DESCRIPTIONS
30 ==================
31
32 af_unix
33
34         The af_unix program creates an AF_UNIX socket at the given location.
35
36 dmerror
37
38         dmerror is a program for creating, destroying and controlling a
39         fault injection device. The device can be set up as initially
40         working and then flip to throwing errors for testing purposes.
41
42 fsync-err
43
44         Specialized program for testing how the kernel reports errors that
45         occur during writeback. Works in conjunction with the dmerror script
46         in tools/ to write data to a device, and then force it to fail
47         writeback and test that errors are reported during fsync and cleared
48         afterward.
49
50 log-writes/replay-log
51
52         Specialized program for replaying a write log that was recorded by
53         device mapper log-writes target.  The tools is used to perform crash
54         consistency tests, allowing to run an arbitrary check tool (fsck) at
55         specified checkpoints in the write log.
56
57 open_by_handle
58
59         The open_by_handle program exercises the open_by_handle_at() system
60         call.  It can check if file handles are valid or stale after certain
61         filesystem operations.
62
63         See also:
64                 _require_exportfs
65
66 stat_test
67
68         The stat_test program is primarily designed to exercise the statx()
69         system call.  It can check statx() against fstatat() and it can
70         compare and check various file attributes.
71
72         See also:
73                 _require_statx
74
75
76 t_dir_type
77
78         The t_dir_type program exercises the getdents64() system call.
79         It prints directory entry names returned from getdents64() and
80         thier d_type, optionally filtered by type or by inode number.
81
82 xfs_io
83
84         The xfs_io program can be found in the xfsprogs package and can be used
85         to perform sequences of I/O commands, though it is limited to what it
86         can do on open files.
87
88         xfs_io is a debugging tool that is aimed at examining regular file I/O
89         paths rather than a raw XFS volume itself.  These code paths include
90         not only the obvious read/write/mmap interfaces for manipulating files,
91         but also cover all of the XFS extensions (such as space preallocation,
92         additional inode flags, etc).
93
94         Most of its commands can also be used with other filesystems.
95
96         See also:
97                 _require_xfs_io_command