From patchwork Fri Nov 3 12:34:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1858895 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=YuTXNmaw; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=3V2bQPFf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SMKv12s5Qz1yQq for ; Fri, 3 Nov 2023 23:34:37 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id D00D03CC809 for ; Fri, 3 Nov 2023 13:34:34 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id BF2483CA697 for ; Fri, 3 Nov 2023 13:34:32 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 27C3314052C5 for ; Fri, 3 Nov 2023 13:34:31 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C2A381F383; Fri, 3 Nov 2023 12:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1699014870; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qmgHMzN48MTTzoSBNPZML6DtS9BLNNhZVeMXD3J40OY=; b=YuTXNmawLMojlNoRV3Hss9lvzgsrkRTxzsVfFJ3HhCCMd7Sc8eWVvc3xA9eEq+kCT3p7Pt CSCmtPbe8rLPkDwsaM1wEZjFiEGn1G1MUcO1Hii/fuU6AYh9FRmlo5f6HWMM4m56PXnP/p WF7L+SNH8e/0uOWIpSbWHEEF8PonILg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1699014870; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qmgHMzN48MTTzoSBNPZML6DtS9BLNNhZVeMXD3J40OY=; b=3V2bQPFfLUjXdQZYgEZhyvltD/w1q5BiArTtLODlPbTBd1oIRI6OmWSv8SL9tak9X8bOBM L/5tCCwR44Aux+Ag== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A07DE1348C; Fri, 3 Nov 2023 12:34:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KK7qJdboRGViWgAAMHmgww (envelope-from ); Fri, 03 Nov 2023 12:34:30 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 3 Nov 2023 13:34:25 +0100 Message-ID: <20231103123427.1072050-2-pvorel@suse.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231103123427.1072050-1-pvorel@suse.cz> References: <20231103123427.1072050-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 1/3] doc/C-Test-API: Reword SAFE_CMD() X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Petr Vorel --- doc/C-Test-API.asciidoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/C-Test-API.asciidoc b/doc/C-Test-API.asciidoc index dab811564..f9f20bb74 100644 --- a/doc/C-Test-API.asciidoc +++ b/doc/C-Test-API.asciidoc @@ -1332,8 +1332,9 @@ return value is '255' if 'execvp()' failed with 'ENOENT' and '254' otherwise. 'stdout_path' and 'stderr_path' determine where to redirect the program stdout and stderr I/O streams. -The 'SAFE_CMD()' macro can be used automatic handling non-zero exits (exits -with 'TBROK') and 'ENOENT' (exits with 'TCONF'). +'SAFE_CMD()' is a wrapper for 'tst_cmd()' which can be used for automatic +handling non-zero exit (exits with 'TBROK') and 'ENOENT' (the program not in +'$PATH', exits with 'TCONF'). .Example [source,c] From patchwork Fri Nov 3 12:34:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1858896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=brCZpYwV; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=A7IZyzz7; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SMKvC71ZRz1yQq for ; Fri, 3 Nov 2023 23:34:47 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 74ACC3CC830 for ; Fri, 3 Nov 2023 13:34:45 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 019593CC7D9 for ; Fri, 3 Nov 2023 13:34:32 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id D11DA14052C4 for ; Fri, 3 Nov 2023 13:34:31 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E10CF1F890; Fri, 3 Nov 2023 12:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1699014870; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=36YmoVZqg3waLGr/rCCzwHBEzDH4819yqsdFacHA/6w=; b=brCZpYwVrY4nObriD+CSnNG3n15/rpGMS0MkSQ6fOI8+JC6kigRNrbrK74iwX4SZ93ABzj 1C3+nD4a40Kl/pVuA9Mf6TSouu26pmzLp3ndpB4HiXMQpE6yUKdosAvuQKlG4oCLfjyjls ziHH57mBKaxpVFgA1bJOHXKNlGNtlUg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1699014870; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=36YmoVZqg3waLGr/rCCzwHBEzDH4819yqsdFacHA/6w=; b=A7IZyzz7p2U3PHtAxPKFL4EPNSsShVFNueCt96XSPSlvUr5NuAiCQmwLU4JYc7WqlXfL0s ceLmpTl4we2iZpAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C8C451348C; Fri, 3 Nov 2023 12:34:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qIiVL9boRGViWgAAMHmgww (envelope-from ); Fri, 03 Nov 2023 12:34:30 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 3 Nov 2023 13:34:26 +0100 Message-ID: <20231103123427.1072050-3-pvorel@suse.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231103123427.1072050-1-pvorel@suse.cz> References: <20231103123427.1072050-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 2/3] include: Add SAFE_CMD() programming doc X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Petr Vorel --- include/tst_safe_macros.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/tst_safe_macros.h b/include/tst_safe_macros.h index 0cf3d7878..6f3289944 100644 --- a/include/tst_safe_macros.h +++ b/include/tst_safe_macros.h @@ -646,9 +646,20 @@ int safe_unshare(const char *file, const int lineno, int flags); int safe_setns(const char *file, const int lineno, int fd, int nstype); #define SAFE_SETNS(fd, nstype) safe_setns(__FILE__, __LINE__, (fd), (nstype)) +/* + * SAFE_CMD() is a wrapper for tst_cmd(). It runs a command passed via argv[] + * and handles non-zero exit (exits with 'TBROK') and 'ENOENT' (the program not + * in '$PATH', exits with 'TCONF'). + * + * @param argv[] a 'NULL' terminated array of strings starting with the program + * name which is followed by optional arguments. + * @param stdout_path: path where to redirect stdout. Set NULL if redirection is + * not needed. + * @param stderr_path: path where to redirect stderr. Set NULL if redirection is + * not needed. + */ void safe_cmd(const char *file, const int lineno, const char *const argv[], const char *stdout_path, const char *stderr_path); - #define SAFE_CMD(argv, stdout_path, stderr_path) \ safe_cmd(__FILE__, __LINE__, (argv), (stdout_path), (stderr_path)) /* From patchwork Fri Nov 3 12:34:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1858897 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=GF8sinpy; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=nErBlTu6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SMKvQ6DZzz1yQq for ; Fri, 3 Nov 2023 23:34:58 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id D58CB3CC81F for ; Fri, 3 Nov 2023 13:34:56 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id F344D3CA697 for ; Fri, 3 Nov 2023 13:34:32 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 27A6E602A0E for ; Fri, 3 Nov 2023 13:34:31 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0E73D1FD6B; Fri, 3 Nov 2023 12:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1699014871; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LZowYb/0w37vIvT3syy0XCsyWRn3AKuQ6oUVvjeqD5Y=; b=GF8sinpy303odqlS5anEROrulyusKfuT4Sn0B7+iZnQhVdzGjqlJ8/b/8f6W+SymNbl6Ln tY+GXNkbDqR9ZYnaqeKU81OIES/r8pF2Y1HhLBEfVD9wAsFZM2/S9pXryRfSUp0ZCtIsJg O8Zt7+Uc3rHkZjE+7OE3C1gTktCMkSQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1699014871; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LZowYb/0w37vIvT3syy0XCsyWRn3AKuQ6oUVvjeqD5Y=; b=nErBlTu6DzVeXiiaKKgDcR/SzeaW2DSDTGA7GMhgjifan4f/cL8P7DiXBYT+Jpd5a3K6iA wRX9+n40dxOB+6DQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E84531348C; Fri, 3 Nov 2023 12:34:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CFxVN9boRGViWgAAMHmgww (envelope-from ); Fri, 03 Nov 2023 12:34:30 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 3 Nov 2023 13:34:27 +0100 Message-ID: <20231103123427.1072050-4-pvorel@suse.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231103123427.1072050-1-pvorel@suse.cz> References: <20231103123427.1072050-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 3/3] include/tst_cmd.h: Improve programming doc X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Petr Vorel --- include/tst_cmd.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/include/tst_cmd.h b/include/tst_cmd.h index 1f39f690f..939825646 100644 --- a/include/tst_cmd.h +++ b/include/tst_cmd.h @@ -18,14 +18,16 @@ enum tst_cmd_flags { /* * vfork() + execvp() specified program. - * @argv: a list of two (at least program name + NULL) or more pointers that + * + * @param argv A list of two (at least program name + NULL) or more pointers that * represent the argument list to the new program. The array of pointers * must be terminated by a NULL pointer. - * @stdout_fd: file descriptor where to redirect stdout. Set -1 if + * @param stdout_fd File descriptor where to redirect stdout. Set -1 if * redirection is not needed. - * @stderr_fd: file descriptor where to redirect stderr. Set -1 if + * @param stderr_fd File descriptor where to redirect stderr. Set -1 if * redirection is not needed. - * @flags: enum tst_cmd_flags + * @param flags enum tst_cmd_flags. + * @return The exit status of the program. */ int tst_cmd_fds_(void (cleanup_fn)(void), const char *const argv[], @@ -33,12 +35,15 @@ int tst_cmd_fds_(void (cleanup_fn)(void), int stderr_fd, enum tst_cmd_flags flags); -/* Executes tst_cmd_fds() and redirects its output to a file - * @stdout_path: path where to redirect stdout. Set NULL if redirection is +/* + * Executes tst_cmd_fds() and redirects its output to a file. + * + * @param stdout_path Path where to redirect stdout. Set NULL if redirection is * not needed. - * @stderr_path: path where to redirect stderr. Set NULL if redirection is + * @param stderr_path Path where to redirect stderr. Set NULL if redirection is * not needed. - * @flags: enum tst_cmd_flags + * @param flags enum tst_cmd_flags. + * @return The exit status of the program. */ int tst_cmd_(void (cleanup_fn)(void), const char *const argv[], @@ -87,7 +92,7 @@ static inline int tst_cmd(void (cleanup_fn)(void), #endif /* Wrapper function for system(3), ignorcing SIGCHLD signal. - * @command: the command to be run. + * @param command The command to be run. */ int tst_system(const char *command);