From patchwork Mon Dec 29 16:06:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1106 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767024418; bh=73wbTWQA2y46vWPUbDC6zt+IBxY57oSq3g/Ay1zcJ5g=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gHd0OEo6yRIcNkb5PSJbdikXzPjOV09V5wzleQc0cb/0WgGaYiQKnrm6uK5DF87HV wQH0aUIE8602ro16oOJEk+5Vhuo9WYB93HnZGfwcWd8Qbk13UKugCiKwYFSP+t3p7f ttKqgy+5+9CCGjhW7QGOWQTs+rjVjrInIXt4nc4KTkYxEwfYFGWflJGHW+xHbJodwI LyLTBl4JW2VFpbAGMgeoPpCRmAWygCWpNEDlxQ0GwJJ9QlXIiC/x5CgWp1nJFWaQJZ wY6xIRkCjwvfi4R6i2udK/40bt+ng9MZTyzSGDrQm7Apc4VN2Z84ZjLJWvxEZjMUZw r+p2wDJHZQ2jw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 62D5A68F31 for ; Mon, 29 Dec 2025 09:06:58 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 1Xhi6LENZh6k for ; Mon, 29 Dec 2025 09:06:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767024418; bh=73wbTWQA2y46vWPUbDC6zt+IBxY57oSq3g/Ay1zcJ5g=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gHd0OEo6yRIcNkb5PSJbdikXzPjOV09V5wzleQc0cb/0WgGaYiQKnrm6uK5DF87HV wQH0aUIE8602ro16oOJEk+5Vhuo9WYB93HnZGfwcWd8Qbk13UKugCiKwYFSP+t3p7f ttKqgy+5+9CCGjhW7QGOWQTs+rjVjrInIXt4nc4KTkYxEwfYFGWflJGHW+xHbJodwI LyLTBl4JW2VFpbAGMgeoPpCRmAWygCWpNEDlxQ0GwJJ9QlXIiC/x5CgWp1nJFWaQJZ wY6xIRkCjwvfi4R6i2udK/40bt+ng9MZTyzSGDrQm7Apc4VN2Z84ZjLJWvxEZjMUZw r+p2wDJHZQ2jw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 516F768F2C for ; Mon, 29 Dec 2025 09:06:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767024416; bh=+isfZIuKHzwwz+H8Hm9gFaozFYyzGYS6NLw+gN0ZlY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X9eBnC6/8gXrbmWcMCfppsWlRbuiydh+VnU4oPmSuCqa5ygw4z2B5Ccf4VaT3DYOH fEbWztyvSddFDm3Bwayk+mjV1iBme1vOnzLpVjJg8u/BoJtqi04jpmKXAsORJYkMFM jhPmnfNotuv9TOpMpoAel28OhzDnDc7MVgA+XfN8HCqZkM7dt6VjOC6tKwvv9pApMd 4Y3SHREX88BR4gHLDnenPMQljDftaCKd/E/fSXL7zO5f9Wj4ROeOzRkiq6YRZAcoi/ YkMMxKWFG6rTxf7vyZlL2cmjG1EfFlHMUF/ELUH3TGA/NrqZr+ickkepc4TjUiYD1X bI9QxhyDX4fRQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 39B9868CAD; Mon, 29 Dec 2025 09:06:56 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id j4C5WvXqh_f4; Mon, 29 Dec 2025 09:06:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767024411; bh=eIYcXrdV3Bmwj2fgSvJlF4I0AfAUz4Lk2kaWE0ehp/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sxNd9k2zrSXhgN4QUFckjNzSajpnj/6eOMKpBIA3CMZNzSDqyOHLPIWQBG9bOpcFt HKeRjhdGQMmCe380fwjAYN68xxA8Wfduzj7MR+iW176k+DGCihyMWrWtzC1jbAuJI4 Tq6xLPZxkskaII6TB6Z7aIdTvereohharNtRurAknPSQgeqIwpcHTCMjjeg/scs2hC yXPT4RfZRbfX16a0UlRtqKpmm9AttokRIYxi6hcTTGC28neQeRXSG32lSwDGoBfhDR hGUPaxBP9HUQHPsFBY5S/g96vCKpjRO/SSOZSBlsilZZwdsfjXb97I+eiugS2oITL4 YeBrR4/Xbv42w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0A96C68CAC; Mon, 29 Dec 2025 09:06:50 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 29 Dec 2025 09:06:06 -0700 Message-ID: <20251229160611.3899708-9-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251229160611.3899708-1-sjg@u-boot.org> References: <20251229160611.3899708-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: GU3KCOVFJL6WT5SPP4LYPFOA7BXJRBQC X-Message-ID-Hash: GU3KCOVFJL6WT5SPP4LYPFOA7BXJRBQC X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 8/9] doc: ut: Document return value List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add documentation for the return value of the ut command: - Returns 0 on success if all tests pass - Returns 1 on failure if any test fails - Skipped tests do not cause a failure Also explain when tests may be skipped and how to detect skipped tests programmatically using the -E flag. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- doc/usage/cmd/ut.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/usage/cmd/ut.rst b/doc/usage/cmd/ut.rst index c40928dece9..731579e5b1d 100644 --- a/doc/usage/cmd/ut.rst +++ b/doc/usage/cmd/ut.rst @@ -84,6 +84,23 @@ To specify a list of suites to run, can also be a comma-separated list. See :ref:`develop/tests_writing:writing c tests` for more information on how to write unit tests. +Return Value +------------ + +The `ut` command returns 0 (success) if all tests pass, or 1 (failure) if any +test fails. + +Skipped tests do not cause a failure return. Tests may be skipped for several +reasons: + +- Manual tests (with `_norun` suffix) are skipped unless `-f` or `-m` is used +- Tests requiring features not available on the current platform (e.g., + `UTF_OTHER_FDT` on non-sandbox, console recording disabled) +- Tests that explicitly request to be skipped by returning `-EAGAIN` + +To detect skipped tests programmatically, use the `-E` flag and check for +`Result: SKIP:` lines in the output. + ut all ~~~~~~