afl-eventtesting: add a realistic impress workout

Change-Id: Ie40071dd91e28131ddb62c03834fda097a1d90ea
This commit is contained in:
Caolán McNamara 2015-10-16 16:21:03 +01:00
parent 6a627d6c5a
commit 639854d77b
4 changed files with 16 additions and 4 deletions

View file

@ -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);

View file

@ -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

Binary file not shown.