[llvm] Clarify conditions of `lit` exiting with exit code 1 (PR #136190)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 13:51:14 PDT 2025


https://github.com/i-ky updated https://github.com/llvm/llvm-project/pull/136190

>From 2a6e543434064e6726b963186b5d8736987d3006 Mon Sep 17 00:00:00 2001
From: i-ky <gl.ivanovsky at gmail.com>
Date: Thu, 17 Apr 2025 20:06:25 +0000
Subject: [PATCH 1/2] Clarify conditions of `lit` exiting with exit code 1

---
 llvm/docs/CommandGuide/lit.rst | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst
index 812e1d819e9c8..6cb1ee4627254 100644
--- a/llvm/docs/CommandGuide/lit.rst
+++ b/llvm/docs/CommandGuide/lit.rst
@@ -384,8 +384,10 @@ ADDITIONAL OPTIONS
 EXIT STATUS
 -----------
 
-:program:`lit` will exit with an exit code of 1 if there are any FAIL or XPASS
-results.  Otherwise, it will exit with the status 0.  Other exit codes are used
+:program:`lit` will exit with an exit code of 1 if there are any failures (i.e.
+unresolved, timed out, failed or unexpectedly passed tests, see also
+:option:`--report-failures-only`) and :option:`--ignore-fail` has not been
+passed.  Otherwise, it will exit with the status 0.  Other exit codes are used
 for non-test related failures (for example a user error or an internal program
 error).
 

>From 802c663c8333cb5069240d0c093163099580040c Mon Sep 17 00:00:00 2001
From: i-ky <gl.ivanovsky at gmail.com>
Date: Thu, 24 Apr 2025 20:50:10 +0000
Subject: [PATCH 2/2] Define "failure" in "Test Status Results"

---
 llvm/docs/CommandGuide/lit.rst | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst
index 6cb1ee4627254..2a0ddd0ea04b4 100644
--- a/llvm/docs/CommandGuide/lit.rst
+++ b/llvm/docs/CommandGuide/lit.rst
@@ -193,7 +193,7 @@ EXECUTION OPTIONS
 
 .. option:: --report-failures-only
 
- Only include unresolved, timed out, failed and unexpectedly passed tests in the report.
+ Only include failures (see :ref:`test-status-results`) in the report.
 
 .. option:: --resultdb-output RESULTDB_OUTPUT
 
@@ -384,9 +384,8 @@ ADDITIONAL OPTIONS
 EXIT STATUS
 -----------
 
-:program:`lit` will exit with an exit code of 1 if there are any failures (i.e.
-unresolved, timed out, failed or unexpectedly passed tests, see also
-:option:`--report-failures-only`) and :option:`--ignore-fail` has not been
+:program:`lit` will exit with an exit code of 1 if there are any failures
+(see :ref:`test-status-results`) and :option:`--ignore-fail` has not been
 passed.  Otherwise, it will exit with the status 0.  Other exit codes are used
 for non-test related failures (for example a user error or an internal program
 error).
@@ -463,8 +462,10 @@ Each test ultimately produces one of the following eight results:
 
 **TIMEOUT**
 
- The test was run, but it timed out before it was able to complete. This is
- considered a failure.
+ The test was run, but it timed out before it was able to complete.
+
+Unresolved (**UNRESOLVED**), timed out (**TIMEOUT**), failed (**FAIL**) and
+unexpectedly passed (**XPASS**) tests are considered failures.
 
 Depending on the test format tests may produce additional information about
 their status (generally only for failures).  See the :ref:`output-options`



More information about the llvm-commits mailing list