162 lines
4.1 KiB
Plaintext
162 lines
4.1 KiB
Plaintext
//////////////////////////////////////////////////////////////////////////////
|
|
// Index.mof contains:
|
|
// Index (root\default) Generator definitions for ESSTest
|
|
// Tests cross-namespace filters.
|
|
//
|
|
// Event and provider definitions for:
|
|
// MSFT_EssTestIndexDefaultEvent
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
// MSFT_EssTestIndexEvent (single DWORD event)
|
|
|
|
#pragma namespace("\\\\.\\root\\default")
|
|
|
|
class MSFT_EssTestIndexDefaultEvent : __ExtrinsicEvent
|
|
{
|
|
uint32 Index;
|
|
};
|
|
|
|
#pragma namespace("\\\\.\\root\\cimv2")
|
|
|
|
// Fires MSFT_EssTestIndexEvent
|
|
instance of MSFT_EssEventGenerator as $Gen1
|
|
{
|
|
Name = "Index (root\\default) Generator";
|
|
CommandLine = "mofprov \"/Nroot\\default\" \"/PDecoupled Index (root\\default) Generator\" \"/F%ResultsFile%\" /B0";
|
|
Script =
|
|
"PrintMOF();\n"
|
|
"\n"
|
|
"function PrintMOF()\n"
|
|
"{\n"
|
|
" var args = WScript.Arguments;\n"
|
|
"\n"
|
|
" for (Index = 0; Index < args(0); Index++)\n"
|
|
" {\n"
|
|
" if (%ScriptRule%)\n"
|
|
" {\n"
|
|
" WScript.Echo(\n"
|
|
" \"instance of MSFT_EssTestIndexDefaultEvent { Index = \" + Index + \"; }; \");\n"
|
|
" }\n"
|
|
" }\n"
|
|
"}\n";
|
|
EventNamespace = "root\\default";
|
|
};
|
|
|
|
instance of MSFT_EssTestWorkItem
|
|
{
|
|
Name = "Index (root\\default) Events";
|
|
EventGenerator = $Gen1;
|
|
|
|
Enabled = false;
|
|
NumEvents = 50000;
|
|
TimesToExecute = 1;
|
|
MaxPermConsumers = 5;
|
|
MaxTempConsumers = 5;
|
|
SlowDownProviders = true;
|
|
};
|
|
|
|
instance of MSFT_EssTestFilter
|
|
{
|
|
Name = "Index Ranges: 800-850";
|
|
|
|
EventGenerator = $Gen1;
|
|
Query =
|
|
"select * from MSFT_EssTestIndexEvent where (Index >= 800 and Index <= 850)";
|
|
|
|
ScriptRule = "(Index >= 800 && Index <= 850)";
|
|
|
|
Behavior = 1;
|
|
};
|
|
|
|
instance of MSFT_EssTestFilter
|
|
{
|
|
Name = "Index Ranges: 2000-2100";
|
|
|
|
EventGenerator = $Gen1;
|
|
Query =
|
|
"select * from MSFT_EssTestIndexEvent where "
|
|
"(Index >= 2000 and Index <= 2100)";
|
|
|
|
ScriptRule = "Index >= 2000 && Index <= 2100";
|
|
|
|
Behavior = 1;
|
|
OnAt = 2;
|
|
OffAt = 6;
|
|
};
|
|
|
|
instance of MSFT_EssTestFilter
|
|
{
|
|
Name = "Index Ranges: 3000-3200 (on/off)";
|
|
|
|
EventGenerator = $Gen1;
|
|
Query =
|
|
"select * from MSFT_EssTestIndexEvent where "
|
|
"(Index >= 3000 and Index <= 3200)";
|
|
|
|
ScriptRule = "Index >= 3000 && Index <= 3200";
|
|
|
|
Behavior = 2;
|
|
OnAt = 2;
|
|
OffAt = 6;
|
|
};
|
|
|
|
instance of MSFT_EssTestFilter
|
|
{
|
|
Name = "Index Ranges: 200-400,600-800,900-950";
|
|
|
|
EventGenerator = $Gen1;
|
|
Query =
|
|
"select * from MSFT_EssTestIndexEvent where "
|
|
"(Index >= 200 and Index <= 250) or "
|
|
"(Index >= 600 and Index <= 800) or "
|
|
"(Index >= 900 and Index <= 950)";
|
|
|
|
ScriptRule =
|
|
"(Index >= 200 && Index <= 250) || "
|
|
"(Index >= 600 && Index <= 800) || "
|
|
"(Index >= 900 && Index <= 950)";
|
|
|
|
Behavior = 1;
|
|
};
|
|
|
|
instance of MSFT_EssTestFilter
|
|
{
|
|
Name = "Index Includes: 10,20,30,40,50,60,70,80,90,100";
|
|
|
|
EventGenerator = $Gen1;
|
|
Query =
|
|
"select * from MSFT_EssTestIndexEvent where "
|
|
"Index = 10 or Index = 20 or Index = 30 or "
|
|
"Index = 40 or Index = 50 or Index = 60 or "
|
|
"Index = 70 or Index = 80 or Index = 90 or "
|
|
"Index = 100";
|
|
|
|
ScriptRule =
|
|
"Index == 10 || Index == 20 || Index == 30 || "
|
|
"Index == 40 || Index == 50 || Index == 60 || "
|
|
"Index == 70 || Index == 80 || Index == 90 || "
|
|
"Index == 100";
|
|
|
|
Behavior = 1;
|
|
};
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
// Decoupled event provider registration.
|
|
|
|
#pragma namespace("\\\\.\\root\\default")
|
|
|
|
instance of Win32PseudoProvider as $P2
|
|
{
|
|
Name = "Decoupled (root\\default) Event Generator";
|
|
};
|
|
|
|
instance of __EventProviderRegistration
|
|
{
|
|
Provider = $P2;
|
|
|
|
EventQueryList =
|
|
{
|
|
"select * from MSFT_EssTestIndexDefaultEvent"
|
|
};
|
|
};
|