[newlib-cygwin/main] Cygwin: CI: cygstress: add GHA annotation and change exit status

Jon Turney via Cygwin-cvs <[email protected]> Thu, 16 Jul 2026 14:09:15 +0000 (GMT)
Newsgroups gmane.os.cygwin.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D161e3cb999f=
bcc288fd359ff10b47952aff91c30

commit 161e3cb999fbcc288fd359ff10b47952aff91c30
Author: Christian Franke <[email protected]>
Date:   Tue Jul 14 18:32:56 2026 +0200

    Cygwin: CI: cygstress: add GHA annotation and change exit status
   =20
    Report list of failed tests as a GHA compatible annotation.
    Use separate exit status 2 instead of 1 if any test failed.
   =20
    Signed-off-by: Christian Franke <[email protected]>

Diff:
---
 winsup/testsuite/stress/cygstress | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/winsup/testsuite/stress/cygstress b/winsup/testsuite/stress/cy=
gstress
index 80dfa795f..c7b4c5723 100755
--- a/winsup/testsuite/stress/cygstress
+++ b/winsup/testsuite/stress/cygstress
@@ -31,6 +31,11 @@ Usage: ${0##*/} [OPTION...] {CI|WORK|FAIL|test...}
   WORK      run all tests tagged WORKS
   FAIL      run all tests tagged FAILS
   test...   run individual test(s) (may require '-f')
+
+  Exit status:
+    0: all tests succeeded
+    1: other error
+    2: some test(s) failed
 EOF
   exit 1
 }
@@ -741,7 +746,15 @@ if [ $total_failed !=3D 0 ]; then
=20
   echo -n ">>> FAILURE: $(ts): ${#tests_failed[*]} of $total_testcases tes=
t case(s) failed"
   echo "; total: $total_failed of $total_tested test(s) failed"
-  exit 1
+
+  # Report list of failed tests as a GHA compatible annotation
+  echo -n "::error:: stress-ng failures:"
+  for ((t =3D 0; t < ${#tests[*]}; t++)); do
+    test -z "${tests_failed[t]}" || echo -n " ${tests[t]}"
+  done
+  echo
+
+  exit 2
 fi
=20
 echo -n ">>> SUCCESS: $(ts): all test(s) of $total_testcases test case(s) =
succeeded"