[Libreoffice-commits] core.git: 2 commits - vcl/source vcl/workben
Caolán McNamara
caolanm at redhat.com
Wed Oct 7 05:44:24 PDT 2015
vcl/source/app/svapp.cxx | 20 ++++++++++++++++----
vcl/workben/README.eventtesting | 3 +--
vcl/workben/eventtesting |binary
3 files changed, 17 insertions(+), 6 deletions(-)
New commits:
commit 9bb6863fcf0784c70a95510b488f0162fe6deb37
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 7 13:40:52 2015 +0100
afl-eventtesting: it has learned to open dialogs, so...
close all open dialogs on quitting to avoid triggering
the hang timeout and get things moving faster
Change-Id: I7469a32549f20d6b0971932e3334cb322f57b1ff
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index c797d00..d4b197b 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -36,6 +36,7 @@
#include <unotools/configmgr.hxx>
#include <unotools/syslocaleoptions.hxx>
+#include "vcl/dialog.hxx"
#include "vcl/settings.hxx"
#include "vcl/keycod.hxx"
#include "vcl/event.hxx"
@@ -347,6 +348,17 @@ namespace
ImplWindowFrameProc(xWin.get(), NULL, SALEVENT_KEYUP, &aKeyEvent);
return true;
}
+
+ void CloseDialogsAndQuit()
+ {
+ vcl::Window* pAppWindow = Application::GetFirstTopLevelWindow();
+ while (pAppWindow)
+ {
+ Dialog::EndAllDialogs(pAppWindow);
+ pAppWindow = Application::GetNextTopLevelWindow(pAppWindow);
+ }
+ Application::Quit();
+ }
}
IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void)
@@ -357,7 +369,7 @@ IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void)
delete mpEventTestInput;
delete mpEventTestingIdle;
SAL_INFO("vcl.eventtesting", "Event Limit reached, exiting" << mnEventTestLimit);
- Application::Quit();
+ CloseDialogsAndQuit();
}
else
{
@@ -369,7 +381,7 @@ IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void)
delete mpEventTestInput;
delete mpEventTestingIdle;
SAL_INFO("vcl.eventtesting", "Event Input exhausted, exiting" << mnEventTestLimit);
- Application::Quit();
+ CloseDialogsAndQuit();
return;
}
Scheduler::ProcessTaskScheduling(true);
commit 967ea727c7f2c954ee8ac33a888718d8dac11837
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 7 13:22:56 2015 +0100
afl-eventtesting: lets ditch the key repeat and timestamp fields
time stamp doesn't matter apparently for keyboard events
so ditching it gives less surface area to fuzz
repeat showed some interesting effects, but mostly just allows
vast paragraphs to be generated causing timeout hangs which isn't
what I'm super interested in right now.
Change-Id: I955b91745a26d5044f0d53acd3fda0a160e53855
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 7fb612b..c797d00 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -336,10 +336,10 @@ namespace
return false;
SalKeyEvent aKeyEvent;
- rStream.ReadUInt64(aKeyEvent.mnTime);
+ aKeyEvent.mnTime = 0;
rStream.ReadUInt16(aKeyEvent.mnCode);
rStream.ReadUInt16(aKeyEvent.mnCharCode);
- rStream.ReadUInt16(aKeyEvent.mnRepeat);
+ aKeyEvent.mnRepeat = 0;
if (!rStream.good())
return false;
diff --git a/vcl/workben/README.eventtesting b/vcl/workben/README.eventtesting
index 0336f22..79472cd 100644
--- a/vcl/workben/README.eventtesting
+++ b/vcl/workben/README.eventtesting
@@ -2,8 +2,7 @@ Notes on experimental afl driven ui fuzzing
only keyboard events for now
-vcl/workben/eventtesting is just serialized "helloworld" keystrokes to get
-things started
+vcl/workben/eventtesting is just serialized "hello" + ctrl+a + ctrl+b keystrokes to get things started
currently an arbitrary limit of 10 keystrokes before application quits in
order to initially explore that shallow space
diff --git a/vcl/workben/eventtesting b/vcl/workben/eventtesting
index 363260a..b85a203 100644
Binary files a/vcl/workben/eventtesting and b/vcl/workben/eventtesting differ
More information about the Libreoffice-commits
mailing list