summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-16 16:21:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-16 17:16:52 +0100
commit639854d77bafb19bda031505daad038916a11593 (patch)
tree86db17ccaa149913ba889a654b2ce13635eb5371
parent6a627d6c5a94dbfae38bc1a6b1f716df19e47fd1 (diff)
afl-eventtesting: add a realistic impress workout
Change-Id: Ie40071dd91e28131ddb62c03834fda097a1d90ea
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/workben/README.eventtesting18
-rw-r--r--vcl/workben/eventtesting.impressbin0 -> 196 bytes
-rw-r--r--vcl/workben/eventtesting.writer (renamed from vcl/workben/eventtesting)bin28 -> 28 bytes
4 files changed, 16 insertions, 4 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 14b34c2ada48..fe4fb7134fec 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -434,7 +434,7 @@ void Application::Execute()
{
if (GetCommandLineParam(i) == "--eventtesting")
{
- pSVData->maAppData.mnEventTestLimit = 10;
+ pSVData->maAppData.mnEventTestLimit = 50;
pSVData->maAppData.mpEventTestingIdle = new Idle("eventtesting");
pSVData->maAppData.mpEventTestingIdle->SetIdleHdl(LINK(&(pSVData->maAppData), ImplSVAppData, VclEventTestingHdl));
pSVData->maAppData.mpEventTestingIdle->SetPriority(SchedulerPriority::MEDIUM);
diff --git a/vcl/workben/README.eventtesting b/vcl/workben/README.eventtesting
index 79472cd57f25..963bed1cdd22 100644
--- a/vcl/workben/README.eventtesting
+++ b/vcl/workben/README.eventtesting
@@ -2,11 +2,23 @@ Notes on experimental afl driven ui fuzzing
only keyboard events for now
-vcl/workben/eventtesting is just serialized "hello" + ctrl+a + ctrl+b keystrokes to get things started
+vcl/workben/eventtesting.writer is just serialized "hello" + ctrl+a + ctrl+b
+keystrokes to get things started
-currently an arbitrary limit of 10 keystrokes before application quits in
+vcl/workben/eventtesting.impress is a bit more involved and inserts text,
+a new slide via the menu, bullets and undos for all of that
+
+currently an arbitrary limit of 50 keystrokes before application quits in
order to initially explore that shallow space
+writer:
Xnest :1
-cp vcl/workben/eventtesting .
+cp vcl/workben/eventtesting.writer eventtesting
afl-fuzz -f eventtesting -t 10000 -i ~/fuzz/in.vcl -o ~/fuzz/out.vcl -d -T vcl -m 50000000 instdir/program/soffice.bin --nologo --writer --eventtesting --norestore --display :1
+
+impress:
+Xnest :1
+cp vcl/workben/eventtesting.impress eventtesting
+afl-fuzz -f eventtesting -t 10000 -i ~/fuzz/in.vcl -o ~/fuzz/out.vcl -d -T vcl -m 50000000 instdir/program/soffice.bin --nologo --impress --eventtesting --norestore --display :1
+
+This also works with --headless and no --display entry and thus no Xnest required
diff --git a/vcl/workben/eventtesting.impress b/vcl/workben/eventtesting.impress
new file mode 100644
index 000000000000..ac7991875af2
--- /dev/null
+++ b/vcl/workben/eventtesting.impress
Binary files differ
diff --git a/vcl/workben/eventtesting b/vcl/workben/eventtesting.writer
index b85a20356f1d..b85a20356f1d 100644
--- a/vcl/workben/eventtesting
+++ b/vcl/workben/eventtesting.writer
Binary files differ