Bug 84362 - vcl / timers unit test ...
Summary: vcl / timers unit test ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.3.0.2 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2014-09-26 09:12 UTC by Michael Meeks
Modified: 2023-05-10 08:36 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2014-09-26 09:12:27 UTC
We recently fell over a unit-test problem where (on Windows) we had a rather long running task holding the SolarMutex while the timer thread was trying to emit events.

We have a unit test harness in: vcl/qa/cppunit/timer.cxx

It would be good to:

a) enable this test for Windows (cf. Module_vcl.mk)
b) add a new test with a new thread whose job is just to take the SolarMutex for a while (say 250ms) and then release it that we spawn before running a high volume AutoTimer test (say 1ms) =)

Hopefully that would catch the queue filling / starvation issue that kendy just fixed on master. Even more ideally we should try to simulate some user input events and ensure that they get through too I think.
Comment 1 Michael Meeks 2014-09-26 09:14:39 UTC
Tobias - I think this one is in your area - though it may require a Windows build =) [ and I couldn't find Jennifer's mail in bugzilla oddly - can you add her ? ;-]
Comment 2 Robinson Tryon (qubit) 2015-12-14 05:01:17 UTC Comment hidden (obsolete)
Comment 3 Robinson Tryon (qubit) 2016-02-18 14:51:58 UTC Comment hidden (obsolete)
Comment 4 Thomas Lendo QA 2020-09-21 19:09:40 UTC
Is this still a relevant issue or can it be closed?
Comment 5 Hossein 2022-07-30 10:37:40 UTC
(In reply to Michael Meeks from comment #0)
> We recently fell over a unit-test problem where (on Windows) we had a rather
> long running task holding the SolarMutex while the timer thread was trying
> to emit events.
> 
> We have a unit test harness in: vcl/qa/cppunit/timer.cxx
> ...
>
> Hopefully that would catch the queue filling / starvation issue that kendy just fixed on master.
Fix by Kendy:
commit 211b3192f05c4120fa2dd0e23988e74bdd310830
Author: Jan Holesovsky <kendy@collabora.com>
Date:   Fri Sep 19 15:48:24 2014 +0200
    fdo#84000: Reimplement the Windows WinSalTimer using Timer Queues.
    
    Timer Queues

Tests by Michael:
commit d998a6ae3afab1ea51c72843d8400cf5c1eca35c
Author: Michael Meeks <michael.meeks@collabora.com>
Date:   Thu Sep 25 11:22:39 2014 +0100

    fdo#84000 - unit test timers / main-loop bits.
    
    At least test Unix platforms.
Comment 6 Hossein 2022-07-30 11:05:58 UTC
@jmux: Did you fix the issue with the below commit?

commit 6e13585508ca3c9b66c6571ad1eb42bfcb66ef0b
Author: Jan-Marek Glogowski <glogow@fbihome.de>
Date:   Sun Jul 7 23:09:15 2019 +0200

    Add a TaskStopwatch to interrupt idle loops

The added test:

    CPPUNIT_TEST(testStopwatch)