[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - sal/qa solenv/gbuild

Don Lewis truckman at apache.org
Tue Jan 31 06:08:27 UTC 2017


 sal/qa/osl/mutex/osl_Mutex.cxx    |    2 +-
 solenv/gbuild/LinkTarget.mk       |   13 -------------
 solenv/gbuild/gbuild.mk           |   14 ++++++++++++++
 solenv/gbuild/platform/windows.mk |    6 ++++--
 4 files changed, 19 insertions(+), 16 deletions(-)

New commits:
commit 91eb929548955c5dfcda6d390e2883981fce0906
Author: Don Lewis <truckman at apache.org>
Date:   Tue Jan 31 05:31:55 2017 +0000

    The clear_001 QA test fails sporadically with a 7 nSec mutex hold time
    
    measurement.  The nominal hold time for the mutex is 5 seconds, but
    because the mutex state is polled at 1 second intervals, the actual
    measured time will probably be 6+ seconds.  If the nanoseconds field
    of the starting timestamp is large, it is possible that it will have
    wrapped to a small value at the poll time when the mutex is detected
    as having been released.  If the time interval was calculated at
    full precision by subtracting both the seconds and nanoseconds fields
    of the before and after timestamps, an interval of just over 6
    seconds could look like 7 seconds and a large negative number of
    nanoseconds.  Since this test only subtracts the seconds field, it
    can think the difference is 7 seconds and fail the "nSec < 7" assertion.
    As a quick fix, change the assertion to "nSec <= 7".

diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index 1b1e46e..4261932 100644
--- a/sal/qa/osl/mutex/osl_Mutex.cxx
+++ b/sal/qa/osl/mutex/osl_Mutex.cxx
@@ -729,7 +729,7 @@ namespace osl_ClearableGuard
 
         myThread.join();
 
-        ASSERT_TRUE(nSec < 7 && nSec > 1) << "ClearableGuard method: clear";
+        ASSERT_TRUE(nSec <= 7 && nSec > 1) << "ClearableGuard method: clear";
     }
 
     TEST_F(clear, clear_002 )
commit 6e7960c2ed194344819e089eb0c3e39045dd0a0e
Author: Damjan Jovanovic <damjan at apache.org>
Date:   Tue Jan 31 05:05:11 2017 +0000

    We need to pass "-DEBUG" to the linker on Windows for debugging to work.
    
    Patch by: me
    Tested by: pats

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 65caabd..b9c068e 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -30,19 +30,6 @@
 # LDFLAGS
 
 # CFLAGS from environment override debug/optimization flags
-ifeq ($(gb_DEBUGLEVEL),2)
-gb_DEBUGGING := TRUE
-endif
-
-ifeq ($(ENABLE_SYMBOLS),SMALL)
-gb_DEBUGGING := TRUE
-else ifeq ($(ENABLE_SYMBOLS),TRUE)
-gb_DEBUGGING := TRUE
-endif
-
-ifeq ($(ENABLE_CRASHDUMP),TRUE)
-gb_DEBUGGING := TRUE
-endif
 
 ifeq ($(gb_DEBUGGING),TRUE)
 CFLAGS ?= $(gb_COMPILEROPTFLAGS) $(gb_DEBUG_CFLAGS)
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index f7c6e76..b0ac8c1 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -92,6 +92,20 @@ gb_DEBUGLEVEL := 1
 endif
 endif
 
+ifeq ($(gb_DEBUGLEVEL),2)
+gb_DEBUGGING := TRUE
+endif
+
+ifeq ($(ENABLE_SYMBOLS),SMALL)
+gb_DEBUGGING := TRUE
+else ifeq ($(ENABLE_SYMBOLS),TRUE)
+gb_DEBUGGING := TRUE
+endif
+
+ifeq ($(ENABLE_CRASHDUMP),TRUE)
+gb_DEBUGGING := TRUE
+endif
+
 ifneq ($(strip $(ENABLE_PCH)),)
 gb_ENABLE_PCH := $(true)
 else
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index df85d20..ecdcf44 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -195,15 +195,17 @@ gb_LinkTarget_LDFLAGS := \
 
 gb_DEBUG_CFLAGS := -Zi
 
+ifeq ($(gb_DEBUGGING),TRUE)
+gb_LinkTarget_LDFLAGS += -DEBUG
+endif
+
 # this does not use CFLAGS so it is not overridable
 ifneq ($(ENABLE_CRASHDUMP),)
-gb_LinkTarget_LDFLAGS += -DEBUG
 gb_CFLAGS+=-Zi
 gb_CXXFLAGS+=-Zi
 endif
 
 ifeq ($(gb_DEBUGLEVEL),2)
-gb_LinkTarget_LDFLAGS += -DEBUG
 gb_COMPILEROPTFLAGS :=
 else
 gb_COMPILEROPTFLAGS := -Ob1 -Oxs -Oy-


More information about the Libreoffice-commits mailing list