[Define]
// Add general definitions here
KNumberToRepeatOOMTest 20
[Enddefine]

[StifSettings]
// Add stif settings here
CheckHeapBalance= on
[EndStifSettings]

// ---------------------------------------------------------------------------
// Test cases for Disk notify handler
// ---------------------------------------------------------------------------

[Test]
title Test Notify disk added
create disknotifyhandlertest testClass
testClass NotifyDiskAddedL
pause 1000
delete testClass
[Endtest]
        
[Test]
title Test Notify disk added with cancel 
create disknotifyhandlertest testClass
testClass NotifyDiskAddedWithCancelL
pause 1000
delete testClass
[Endtest]
        
[Test]
title Test Notify disk removed
create disknotifyhandlertest testClass
testClass NotifyDiskRemovedL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify disk removed with cancel
create disknotifyhandlertest testClass
testClass NotifyDiskRemovedWithCancelL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify disk changed
create disknotifyhandlertest testClass
testClass NotifyDiskChangedL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify disk changed with cancel
create disknotifyhandlertest testClass
testClass NotifyDiskChangedWithCancelL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify dismount 
create disknotifyhandlertest testClass
testClass NotifyDismountL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify dismount 
create disknotifyhandlertest testClass
testClass NotifyDismountWithCancelL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify dismount error
create disknotifyhandlertest testClass
testClass NotifyDismountErrorL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify disk space over
create disknotifyhandlertest testClass
testClass NotifyDiskSpaceOverL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify disk space over with cancel
create disknotifyhandlertest testClass
testClass NotifyDiskSpaceOverWithCancelL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify disk space under
create disknotifyhandlertest testClass
testClass NotifyDiskSpaceUnderL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify disk space error
create disknotifyhandlertest testClass
testClass NotifyDiskSpaceErrorL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify entry added
create disknotifyhandlertest testClass
testClass NotifyEntryAddedL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify entry added with cancel
create disknotifyhandlertest testClass
testClass NotifyEntryAddedWithCancelL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify entry removed
create disknotifyhandlertest testClass
testClass NotifyEntryRemovedL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify entry changed
create disknotifyhandlertest testClass
testClass NotifyEntryChangedL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify entry error
create disknotifyhandlertest testClass
testClass NotifyEntryErrorL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify multiple events 
create disknotifyhandlertest testClass
testClass NotifyMultipleEventsL
pause 1000
delete testClass
[Endtest]

[Test]
title Test Notify multiple events with cancel all
create disknotifyhandlertest testClass
testClass NotifyMultipleEventsWithCancelAllL
pause 1000
delete testClass
[Endtest]
        
[Test]
title Test Start dismount
create disknotifyhandlertest testClass
testClass StartDismountL
pause 1000
delete testClass
[Endtest]        

[Test]
title Test Start dismount with cancel
create disknotifyhandlertest testClass
testClass StartDismountWithCancelL
pause 1000
delete testClass
[Endtest]        

[Test]
title Test Start dismount forced
create disknotifyhandlertest testClass
testClass StartDismountForcedL
pause 1000
delete testClass
[Endtest]        

[Test]
title Test Start dismount forced with cancel
create disknotifyhandlertest testClass
testClass StartDismountForcedWithCancelL
pause 1000
delete testClass
[Endtest]        

//OOM test code

[Test]
title OOM_Test Notify disk added
create disknotifyhandlertest testClass

oomignorefailure ON
loop KNumberToRepeatOOMTest
oomheapfailnext LOOP_COUNTER
testClass NotifyDiskAddedL
endloop
oomignorefailure OFF
oomheaptonormal

delete test
[Endtest]


[Test]
title OOM_Test Notify disk removed
create disknotifyhandlertest testClass

oomignorefailure ON
loop KNumberToRepeatOOMTest
oomheapfailnext LOOP_COUNTER
testClass NotifyDiskRemovedL
endloop
oomignorefailure OFF
oomheaptonormal

delete test
[Endtest]

[Test]
title OOM_Test Notify disk changed
create disknotifyhandlertest testClass

oomignorefailure ON
loop KNumberToRepeatOOMTest
oomheapfailnext LOOP_COUNTER
testClass NotifyDiskChangedL
endloop
oomignorefailure OFF
oomheaptonormal

delete test
[Endtest]

[Test]
title OOM_Test Notify dismount 
create disknotifyhandlertest testClass

oomignorefailure ON
loop KNumberToRepeatOOMTest
oomheapfailnext LOOP_COUNTER
testClass NotifyDismountL
endloop
oomignorefailure OFF
oomheaptonormal

delete test
[Endtest]


[Test]
title OOM_Test Notify disk space over
create disknotifyhandlertest testClass

oomignorefailure ON
loop KNumberToRepeatOOMTest
oomheapfailnext LOOP_COUNTER
testClass NotifyDiskSpaceOverL
endloop
oomignorefailure OFF
oomheaptonormal

delete test
[Endtest]
[Test]
title OOM_Test Notify entry added
create disknotifyhandlertest testClass

oomignorefailure ON
loop KNumberToRepeatOOMTest
oomheapfailnext LOOP_COUNTER
testClass NotifyEntryAddedL
endloop
oomignorefailure OFF
oomheaptonormal

delete test
[Endtest]
[Test]
title OOM_Test Start dismount
create disknotifyhandlertest testClass

oomignorefailure ON
loop KNumberToRepeatOOMTest
oomheapfailnext LOOP_COUNTER
testClass StartDismountL
endloop
oomignorefailure OFF
oomheaptonormal

delete test
[Endtest]