File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed
Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change 3636 'master' : (f'{ ltp_repo } /blob/master/%s' , '%s' ),
3737 'git_man' : ('https://git-scm.com/docs/git-%s' , 'git %s' ),
3838 'man2' : ('https://man7.org/linux/man-pages/man2/%s.2.html' , '%s(2)' ),
39+ 'man3' : ('https://man7.org/linux/man-pages/man3/%s.3.html' , '%s(3)' ),
3940 # TODO: allow 2nd parameter to show page description instead of plain URL
4041 'kernel_doc' : ('https://docs.kernel.org/%s.html' , 'https://docs.kernel.org/%s.html' ),
4142 'kernel_tree' : ('https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/%s' , '%s' ),
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ Checkpoints
2525
2626.. kernel-doc :: ../../include/tst_checkpoint.h
2727
28+ Commands
29+ --------
30+ .. kernel-doc :: ../../include/tst_cmd.h
31+
2832Crypto
2933------
3034.. kernel-doc :: ../../include/tst_crypto.h
Original file line number Diff line number Diff line change 11/* SPDX-License-Identifier: GPL-2.0-or-later
22 * Copyright (c) 2015-2016 Cyril Hrubis <chrubis@suse.cz>
3+ * Copyright (c) Linux Test Project, 2016-2025
34 */
45
56#ifndef TST_CMD_H__
67#define TST_CMD_H__
78
9+ /**
10+ * enum tst_cmd_flags - flags for tst_cmd() and tst_cmd_fds().
11+ *
12+ * @TST_CMD_PASS_RETVAL: return the program exit code, otherwise it will call
13+ * cleanup_fn() if the program exit code is not zero.
14+ * @TST_CMD_TCONF_ON_MISSING: exit with :c:enum:`TCONF <tst_res_flags>` if
15+ * program is not in ``PATH``.
16+ */
817enum tst_cmd_flags {
9- /*
10- * return the program exit code, otherwise it will call cleanup_fn() if the
11- * program exit code is not zero.
12- */
1318 TST_CMD_PASS_RETVAL = 1 ,
14-
15- /* exit with TCONF if program is not in path */
1619 TST_CMD_TCONF_ON_MISSING = 2 ,
1720};
1821
@@ -94,8 +97,13 @@ static inline int tst_cmd(void (cleanup_fn)(void),
9497}
9598#endif
9699
97- /* Wrapper function for system(3), ignorcing SIGCHLD signal.
98- * @param command The command to be run.
100+ /**
101+ * tst_system() - Wrapper function for :man3:`system`, ignorcing ``SIGCHLD``
102+ * signal.
103+ *
104+ * @command: The command to be run.
105+ *
106+ * Return: The system() return code.
99107 */
100108int tst_system (const char * command );
101109
You can’t perform that action at this time.
0 commit comments