0027713: Test bugs fclasses bug6143 is not OK for Linux after restoring FPS (26329)
authorabv <abv@opencascade.com>
Mon, 29 Aug 2016 03:22:44 +0000 (06:22 +0300)
committerkgv <kgv@opencascade.com>
Fri, 30 Sep 2016 08:17:19 +0000 (11:17 +0300)
Use standard (POSIX-compliant) macro "__linux__" for identification of Linux system, instead of obsolete "linux"

src/OSD/OSD_Chronometer.cxx
src/OSD/OSD_signal.cxx
src/QABugs/QABugs_11.cxx
src/Standard/Standard_MMgrOpt.cxx
tests/bugs/fclasses/bug6143
tests/bugs/modalg_6/bug27842 [changed mode: 0644->0755]

index 6153aaf..bbedf8a 100644 (file)
@@ -57,7 +57,7 @@
 //=======================================================================
 void OSD_Chronometer::GetProcessCPU (Standard_Real& UserSeconds, Standard_Real& SystemSeconds)
 {
-#if defined(__linux__) || defined(linux) || defined(__FreeBSD__) || defined(__ANDROID__) || defined(__QNX__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__ANDROID__) || defined(__QNX__)
   static const long aCLK_TCK = sysconf(_SC_CLK_TCK);
 #else
   static const long aCLK_TCK = CLK_TCK;
index 6f0451a..365831a 100644 (file)
@@ -615,7 +615,7 @@ LONG _osd_debug ( void ) {
 // POSIX threads
 #include <pthread.h>
 
-#ifdef linux
+#ifdef __linux__
 #include <fenv.h>
 static Standard_Boolean fFltExceptions = Standard_False;
 #endif
@@ -798,7 +798,7 @@ static void Handler (const int theSignal)
   // cout << "OSD::Handler: signal " << (int) theSignal << " occured inside a try block " <<  endl ;
   if ( ADR_ACT_SIGIO_HANDLER != NULL )
     (*ADR_ACT_SIGIO_HANDLER)() ;
-#ifdef linux
+#ifdef __linux__
   if (fFltExceptions)
     feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
     //feenableexcept (FE_INVALID | FE_DIVBYZERO);
@@ -922,7 +922,7 @@ static void SegvHandler(const int theSignal,
   (void)theSignal; // silence GCC warnings
   (void)theContext;
 #endif
-#ifdef linux
+#ifdef __linux__
   if (fFltExceptions)
     feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
     //feenableexcept (FE_INVALID | FE_DIVBYZERO);
@@ -1009,7 +1009,7 @@ void OSD::SetSignal(const Standard_Boolean aFloatingSignal)
       cerr << "ieee_handler does not work !!! KO " << endl;
 #endif
     }
-#elif defined (linux)
+#elif defined (__linux__)
     feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
     //feenableexcept (FE_INVALID | FE_DIVBYZERO);
     fFltExceptions = Standard_True;
@@ -1096,7 +1096,7 @@ void OSD::SetSignal(const Standard_Boolean aFloatingSignal)
        sigaction(SIGBUS,&oact,&oact);
 #endif
 
-#if (!defined (linux)) && (!defined(__linux__))
+#if !defined(__linux__)
   sigaction(SIGSYS,&act,&oact);   // ...... bad argument to system call
 
 # ifdef OBJS
index 2c1d49d..0a98499 100644 (file)
@@ -2452,7 +2452,7 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co
     }
     catch(Standard_NumericError) // Linux, Windows with SSE2
     {
-      di << "Exception is caught, OK\n";
+      di << "Caught, OK\n";
     }
     catch(Standard_Failure) {
       //cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl;
index f188393..387dae6 100644 (file)
@@ -249,7 +249,7 @@ void Standard_MMgrOpt::Initialize()
       perror("ERR_MEMRY_FAIL");
 #endif
     
-#if defined(IRIX) || defined(__sgi) || defined(SOLARIS) || defined(__sun) || defined(__linux__) || defined(linux) || defined(__FreeBSD__) || defined(__ANDROID__)
+#if defined(IRIX) || defined(__sgi) || defined(SOLARIS) || defined(__sun) || defined(__linux__) || defined(__FreeBSD__) || defined(__ANDROID__)
     if ((myMMap = open ("/dev/zero", O_RDWR)) < 0) {
       if ((myMMap = open ("/dev/null", O_RDWR)) < 0){
         myMMap = 0;
index a3bbb06..0fa01f9 100644 (file)
@@ -1,6 +1,4 @@
 puts "TODO OCC24156 MacOS: Faulty OCC6143"
-puts "TODO OCC27713 Linux: Faulty OCC6143"
-puts "TODO OCC27713 Linux: Error"
 
 puts "================"
 puts "OCC1723"
@@ -10,8 +8,7 @@ puts "OCC12131"
 puts "================"
 puts ""
 #######################################################################################
-# OSD::SetSignal : not all FLT exceptions are catched
-# Correct handling of exceptions on WNT
+# OSD::SetSignal : not all FLT exceptions are caught
 #######################################################################################
 
 pload QAcommands
old mode 100644 (file)
new mode 100755 (executable)
index b43867c..e55c77d
@@ -6,12 +6,7 @@ puts ""
 # Exception in intersection algorithm if FPE is switched on
 ######################################################
 
-puts "TODO OCC26329 ALL: Error: dsetsignal command does not exist"
-
-# This "if" should be deleted after integration the fix for issue #26329
-if { [catch { dsetsignal 1 } ] } {
-  puts "Error: dsetsignal command does not exist"
-}
+dsetsignal 1
 
 restore [locate_data_file bug27842_shape1_fix.brep] b1 
 restore [locate_data_file bug27842_shape2_fix.brep] b2