Browse Source

Tests: Do not expect EINTR when sleep is interrupted on GNU/Hurd

Previously `RunCMake.CTestTimeout` failed on GNU/Hurd because the
`sleep` command does not set `errno` to `EINTR` when interrupted by a
signal, which is a Linux-specific feature.
Mattias Ellert 1 year ago
parent
commit
8f53526dec
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Tests/RunCMake/CTestTimeout/TestTimeout.c

+ 1 - 1
Tests/RunCMake/CTestTimeout/TestTimeout.c

@@ -45,7 +45,7 @@ int main(void)
 #if defined(_WIN32)
 #if defined(_WIN32)
   Sleep((TIMEOUT + 4) * 1000);
   Sleep((TIMEOUT + 4) * 1000);
 #elif defined(SIGNAL_IGNORE)
 #elif defined(SIGNAL_IGNORE)
-#  if defined(__CYGWIN__) || defined(__sun__)
+#  if defined(__CYGWIN__) || defined(__sun__) || defined(__GNU__)
 #    define ERRNO_IS_EINTR (errno == EINTR || errno == 0)
 #    define ERRNO_IS_EINTR (errno == EINTR || errno == 0)
 #  else
 #  else
 #    define ERRNO_IS_EINTR (errno == EINTR)
 #    define ERRNO_IS_EINTR (errno == EINTR)