Jon Turney wrote:
---
  .github/workflows/cygwin.yml      |  22 +-
  winsup/testsuite/stress/cygstress | 603 ++++++++++++++++++++++++++++++


Attached is a minor update of my local version for current Cygwin and stress-ng HEADs. Mostly changed comments, but also adds "pty" to CI. This works (on main only) thanks to the "termios: Implement tcflow(), tcdrain(), TCXONC, TIOCINQ" patch.

--
Regards,
Christian

diff --git a/cygstress b/cygstress
index 493ff3e..9e31325 100644
--- a/cygstress
+++ b/cygstress
@@ -25,13 +25,13 @@ Usage: ${0##*/} [OPTION...] {CI|WORK|FAIL|test...}
   CI        run all tests tagged CI
   WORK      run all tests tagged WORKS
   FAIL      run all tests tagged FAILS
-  test...   run invidual test(s) (may require '-f')
+  test...   run individual test(s) (may require '-f')
 EOF
   exit 1
 }
 
 # Tags:
-# WORKS: works on Cygwin (3.7.0-0.43.g779e46b5b3ee)
+# WORKS: works on Cygwin (3.7.0-0.51.gd35cc82b5ec1)
 # WORKS,CI: possibly suitable subset for Cygwin CI test.
 # FAILS: fails on Cygwin, see "TODO Cygwin" for details.
 # heavy: heavy resource usage, may work, hang, freeze desktop, require reset, 
...
@@ -117,10 +117,12 @@ stress_tests='
   fanotify      # -----
   far-branch    # WORKS
   fault         # WORKS
-  fcntl         # FAILS     # TODO Cygwin: "ftruncate failed, errno=21 (Is a 
directory)", please see:
-                            #   
https://sourceware.org/pipermail/cygwin/2025-April/257871.html
+  fcntl         # FAILS     # TODO this script: fixed in stress-ng >0.18.12: 
"F_SETLKW (F_WRLCK) failed: ...
+                            #                   ... errno=45 (Resource 
deadlock avoided)"
+                            # (fixed in Cygwin 3.6.1: "ftruncate failed, 
errno=21 (Is a directory)")
   fd-fork       # WORKS,CI
-  fd-race       # -----     # TODO stress-ng: drop Linux restriction (but then 
it FAILS)
+  fd-race       # -----     # TODO stress-ng: drop restriction to Linux
+                            # TODO Cygwin: close(2) is not thread-safe, see 
also "close"
   fibsearch     # WORKS
   fiemap        # -----
   fifo          # WORKS
@@ -128,7 +130,7 @@ stress_tests='
   filename      # FAILS     # TODO Cygwin: creates files Cygwin cannot remove 
later, please see:
                             #   
https://sourceware.org/pipermail/cygwin/2024-September/256451.html
   filename --filename-opts posix # WORKS,CI # restricts filenames to POSIX 
charset
-# filerace      # WORKS     # TODO this script: add in stress-ng >0.18.12
+# filerace      # WORKS     # TODO this script: added in stress-ng >0.18.12
   flipflop      # WORKS
   flock         # WORKS,CI
   flushcache    # WORKS
@@ -211,7 +213,7 @@ stress_tests='
   matrix-3d     # WORKS
   mcontend      # WORKS
   membarrier    # -----
-  memcpy        # WORKS,CI  # (fixed in Cygwin >3.6.0: crash due to set DF in 
signal handler)
+  memcpy        # WORKS,CI  # (fixed in Cygwin 3.6.1: crash due to set DF in 
signal handler)
   memfd         # -----
   memhotplug    # -----
   memrate       # WORKS
@@ -236,7 +238,7 @@ stress_tests='
   monte-carlo   # WORKS
   mpfr          # WORKS     # uses libmpfr
   mprotect      # FAILS     # TODO Cygwin: crashes or hangs
-  mq            # FAILS     # TODO Cygwin: "mq_receive failed, errno=1"
+  mq            # FAILS     # TODO undecided: "fail: ... mq_[timed]receive 
failed, errno=1"
                             # (fixed in Cygwin 3.5.6: crash on invalid mq fd)
   mremap        # -----
   mseal         # -----
@@ -286,9 +288,8 @@ stress_tests='
   pthread       # WORKS,CI
   ptr-chase     # WORKS
   ptrace        # -----
-  pty           # FAILS     # TODO stress-ng: do not require 
tcdrain/tcflow/TIOCINQ for pty, or ...
-                            # ... TODO Cygwin: implement 
tcdrain/tcflow/TIOCINQ for pty :-)
-                            # (fixed in Cygwin 3.7.0: "No pty allocated, 
errno=0")
+  pty           # WORKS,CI  # (fixed in Cygwin 3.7.0: implement 
tcdrain/tcflow/TIOCINQ for pty)
+                            # (fixed in Cygwin 3.6.1: "No pty allocated, 
errno=0")
   qsort         # WORKS
   quota         # -----
 
@@ -335,7 +336,8 @@ stress_tests='
   sigabrt       # WORKS,CI
   sigbus        # FAILS     # TODO Cygwin: "ftruncate file to a single page 
failed, errno=13 (Permission denied)"
   sigchld       # FAILS     # TODO Cygwin: hangs
-  sigfd         # -----     # TODO stress-ng: drop restriction to glibc (WORKS 
then)
+  sigfd         # -----     # TODO Cygwin: "stressor terminated with 
unexpected signal 11 ''SIGSEGV''"
+                            # (fixed in stress-ng >0.18.12: drop restriction 
to glibc)
   sigfpe        # FAILS     # TODO undecided: "got SIGFPE error 15 
(FPE_INTDEV), expecting 20 (FPE_FLTRES)"
   sighup        # WORKS,CI
   sigill        # FAILS     # TODO Cygwin: "terminated on signal: 11", 
possibly similar to "priv-instr"
@@ -357,7 +359,7 @@ stress_tests='
   sleep         # WORKS,CI
   smi           # -----
   sock          # WORKS
-  sockabuse     # WORKS
+  sockabuse     # FAILS     # TODO undecided: "recv failed, errno=113 
(Software caused connection abort)"
   sockdiag      # -----
   sockfd        # -----
   sockmany      # heavy
@@ -371,7 +373,7 @@ stress_tests='
   stackmmap     # WORKS
   statmount     # -----
   str           # WORKS
-  stream        # WORKS     # TODO stress-ng: get --stream-l3-size for 
/proc/cpuinfo
+  stream        # WORKS     # (fixed in stress-ng >0.18.12: --stream-l3-size 
set correctly)
   swap          # -----
   switch        # WORKS
   symlink       # WORKS,CI
@@ -384,13 +386,13 @@ stress_tests='
   sysfs         # -----
 
   tee           # -----     # requires tee(2)
-  timer         # WORKS,CI
+  timer         # WORKS,CI  # TODO undecided: "1 timer settime calls failed"
   timerfd       # heavy     # TODO undecided: may freeze desktop
   time-warp     # WORKS
   tlb-shootdown # heavy
   tmpfs         # -----     # requires tmpfs filesystem
   touch         # WORKS
-  tree          # WORKS     # (fixed in Cygwin >3.6.0: crash due to set DF in 
signal handler, see also "memcpy")
+  tree          # WORKS     # (fixed in Cygwin 3.6.1: crash due to set DF in 
signal handler, see also "memcpy")
   trig          # WORKS
   tsc           # WORKS
   tsearch       # WORKS
@@ -466,11 +468,11 @@ esac; shift || usage; done
 run_ci=false; run_work=false; run_fail=false
 run_tests=
 
-for t in "$@"; do case $t in
+while [ $# -ge 1 ]; do case $1 in
   CI) run_ci=true ;;  WORK) run_work=true ;; FAIL) run_fail=true ;;
-  [a-z]*[a-z]) run_tests+=" $t" ;;
+  [a-z]*[a-z]) run_tests+=" $1" ;;
   *) usage ;;
-esac; done
+esac; shift; done
 $run_ci || $run_work || $run_fail || [ ${run_tests:+t} ] || usage
 
 command -V "$stress_ng" >/dev/null || exit 1
@@ -580,7 +582,7 @@ while read; do
     admin|heavy)
       $run_this || continue
       if ! $force; then
-        echo ">>> SKIPPED $name (tagged '$tag', use '-f' to override)"; echo
+        echo ">>> SKIPPED: $name (tagged '$tag', use '-f' to override)"; echo
         continue
       fi ;;
     *) echo "*** syntax error: '$REPLY'"; exit 1 ;;

Reply via email to