Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
08acac5f
Commit
08acac5f
authored
Oct 07, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Oct 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox/tests: Add tests for Win32_Bios table.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
parent
5252d19f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
0 deletions
+109
-0
query.c
dlls/wbemprox/tests/query.c
+109
-0
No files found.
dlls/wbemprox/tests/query.c
View file @
08acac5f
...
...
@@ -243,6 +243,114 @@ out:
SysFreeString
(
class
);
}
static
void
test_Win32_Bios
(
IWbemServices
*
services
)
{
static
const
WCHAR
queryW
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'B'
,
'i'
,
'o'
,
's'
,
0
};
static
const
WCHAR
descriptionW
[]
=
{
'D'
,
'e'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
identificationcodeW
[]
=
{
'I'
,
'd'
,
'e'
,
'n'
,
't'
,
'i'
,
'f'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
manufacturerW
[]
=
{
'M'
,
'a'
,
'n'
,
'u'
,
'f'
,
'a'
,
'c'
,
't'
,
'u'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
nameW
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
releasedateW
[]
=
{
'R'
,
'e'
,
'l'
,
'e'
,
'a'
,
's'
,
'e'
,
'D'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
serialnumberW
[]
=
{
'S'
,
'e'
,
'r'
,
'i'
,
'a'
,
'l'
,
'N'
,
'u'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
smbiosbiosversionW
[]
=
{
'S'
,
'M'
,
'B'
,
'I'
,
'O'
,
'S'
,
'B'
,
'I'
,
'O'
,
'S'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
versionW
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
BSTR
wql
=
SysAllocString
(
wqlW
),
query
=
SysAllocString
(
queryW
);
IEnumWbemClassObject
*
result
;
IWbemClassObject
*
obj
;
CIMTYPE
type
;
ULONG
count
;
VARIANT
val
;
HRESULT
hr
;
hr
=
IWbemServices_ExecQuery
(
services
,
wql
,
query
,
0
,
NULL
,
&
result
);
ok
(
hr
==
S_OK
,
"IWbemServices_ExecQuery failed %08x
\n
"
,
hr
);
hr
=
IEnumWbemClassObject_Next
(
result
,
10000
,
1
,
&
obj
,
&
count
);
ok
(
hr
==
S_OK
,
"IEnumWbemClassObject_Next failed %08x
\n
"
,
hr
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
descriptionW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get description %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"description: %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
identificationcodeW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get identication code %08x
\n
"
,
hr
);
todo_wine
ok
(
V_VT
(
&
val
)
==
VT_NULL
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
manufacturerW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get manufacturer %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"manufacturer: %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
nameW
,
0
,
&
val
,
&
type
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"failed to get name %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"name: %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
}
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
releasedateW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get release date %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_DATETIME
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"release date: %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
serialnumberW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get serial number %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
||
V_VT
(
&
val
)
==
VT_NULL
/* Testbot VMs */
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
smbiosbiosversionW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get bios version %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"bios version: %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
versionW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get version %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_STRING
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"version: %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
IWbemClassObject_Release
(
obj
);
IEnumWbemClassObject_Release
(
result
);
SysFreeString
(
query
);
SysFreeString
(
wql
);
}
static
void
test_Win32_Process
(
IWbemServices
*
services
)
{
static
const
WCHAR
returnvalueW
[]
=
{
'R'
,
'e'
,
't'
,
'u'
,
'r'
,
'n'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
0
};
...
...
@@ -945,6 +1053,7 @@ START_TEST(query)
ok
(
hr
==
S_OK
,
"failed to set proxy blanket %08x
\n
"
,
hr
);
test_select
(
services
);
test_Win32_Bios
(
services
);
test_Win32_Process
(
services
);
test_Win32_Service
(
services
);
test_Win32_ComputerSystem
(
services
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment