Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4e9b306e
Commit
4e9b306e
authored
Nov 21, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Remove workarounds in testRegisterDeviceInfo().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
16eb2b26
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
29 deletions
+29
-29
devinst.c
dlls/setupapi/tests/devinst.c
+29
-29
No files found.
dlls/setupapi/tests/devinst.c
View file @
4e9b306e
...
@@ -535,52 +535,52 @@ static void test_get_device_instance_id(void)
...
@@ -535,52 +535,52 @@ static void test_get_device_instance_id(void)
SetupDiDestroyDeviceInfoList
(
set
);
SetupDiDestroyDeviceInfoList
(
set
);
}
}
static
void
test
RegisterDeviceI
nfo
(
void
)
static
void
test
_register_device_i
nfo
(
void
)
{
{
static
const
WCHAR
bogus
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
static
const
WCHAR
bogus
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'E'
,
'n'
,
'u'
,
'm'
,
'\\'
,
'U'
,
'S'
,
'B'
,
'\\'
,
'B'
,
'O'
,
'G'
,
'U'
,
'S'
,
0
};
'E'
,
'n'
,
'u'
,
'm'
,
'\\'
,
'U'
,
'S'
,
'B'
,
'\\'
,
'B'
,
'O'
,
'G'
,
'U'
,
'S'
,
0
};
SP_DEVINFO_DATA
device
=
{
0
};
BOOL
ret
;
BOOL
ret
;
HDEVINFO
set
;
HDEVINFO
set
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiRegisterDeviceInfo
(
NULL
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
ret
=
SetupDiRegisterDeviceInfo
(
NULL
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
ok
(
!
ret
,
"Expected failure.
\n
"
);
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Got unexpected error %#x.
\n
"
,
GetLastError
());
set
=
pSetupDiCreateDeviceInfoList
(
&
guid
,
NULL
);
ok
(
set
!=
NULL
,
"SetupDiCreateDeviceInfoList failed: %d
\n
"
,
GetLastError
());
set
=
SetupDiCreateDeviceInfoList
(
&
guid
,
NULL
);
if
(
set
)
ok
(
set
!=
NULL
,
"Failed to create device list, error %#x.
\n
"
,
GetLastError
());
{
SP_DEVINFO_DATA
devInfo
=
{
0
};
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiRegisterDeviceInfo
(
set
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
ret
=
SetupDiRegisterDeviceInfo
(
set
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
ok
(
!
ret
,
"Expected failure.
\n
"
);
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Got unexpected error %#x.
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiRegisterDeviceInfo
(
set
,
&
devInfo
,
0
,
NULL
,
NULL
,
NULL
);
ret
=
SetupDiRegisterDeviceInfo
(
set
,
&
device
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
ok
(
!
ret
,
"Expected failure.
\n
"
);
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Got unexpected error %#x.
\n
"
,
GetLastError
());
devInfo
.
cbSize
=
sizeof
(
devInfo
);
device
.
cbSize
=
sizeof
(
device
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiRegisterDeviceInfo
(
set
,
&
devInfo
,
0
,
NULL
,
NULL
,
NULL
);
ret
=
SetupDiRegisterDeviceInfo
(
set
,
&
device
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
ok
(
!
ret
,
"Expected failure.
\n
"
);
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Got unexpected error %#x.
\n
"
,
GetLastError
());
ret
=
pSetupDiCreateDeviceInfoA
(
set
,
"USB
\\
BOGUS
\\
0000"
,
&
guid
,
ret
=
SetupDiCreateDeviceInfoA
(
set
,
"USB
\\
BOGUS
\\
0000"
,
&
guid
,
NULL
,
NULL
,
0
,
&
device
);
NULL
,
NULL
,
0
,
&
devInfo
);
ok
(
ret
,
"Failed to create device, error %#x.
\n
"
,
GetLastError
());
ok
(
ret
,
"SetupDiCreateDeviceInfoA failed: %08x
\n
"
,
GetLastError
());
ret
=
pSetupDiRegisterDeviceInfo
(
set
,
&
devInfo
,
0
,
NULL
,
NULL
,
NULL
);
ret
=
SetupDiRegisterDeviceInfo
(
set
,
&
device
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
ret
,
"SetupDiRegisterDeviceInfo failed: %d
\n
"
,
GetLastError
());
ok
(
ret
,
"Failed to register device, error %#x.
\n
"
,
GetLastError
());
ret
=
pSetupDiRemoveDevice
(
set
,
&
devInfo
);
ret
=
SetupDiRemoveDevice
(
set
,
&
device
);
todo_wine
ok
(
ret
,
"got %u
\n
"
,
GetLastError
());
todo_wine
pSetupDiDestroyDeviceInfoList
(
set
);
ok
(
ret
,
"Failed to remove device, error %#x.
\n
"
,
GetLastError
());
SetupDiDestroyDeviceInfoList
(
set
);
/* remove once Wine is fixed */
/* remove once Wine is fixed */
devinst_RegDeleteTreeW
(
HKEY_LOCAL_MACHINE
,
bogus
);
devinst_RegDeleteTreeW
(
HKEY_LOCAL_MACHINE
,
bogus
);
}
}
}
static
void
testCreateDeviceInterface
(
void
)
static
void
testCreateDeviceInterface
(
void
)
...
@@ -1517,7 +1517,7 @@ START_TEST(devinst)
...
@@ -1517,7 +1517,7 @@ START_TEST(devinst)
test_install_class
();
test_install_class
();
test_device_info
();
test_device_info
();
test_get_device_instance_id
();
test_get_device_instance_id
();
test
RegisterDeviceI
nfo
();
test
_register_device_i
nfo
();
testCreateDeviceInterface
();
testCreateDeviceInterface
();
testGetDeviceInterfaceDetail
();
testGetDeviceInterfaceDetail
();
testDevRegKey
();
testDevRegKey
();
...
...
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