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
7c27a969
Commit
7c27a969
authored
Jul 11, 2012
by
Alexandre Goujon
Committed by
Alexandre Julliard
Jul 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add a helper to test CDROM ioctl.
parent
9536e66d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
volume.c
dlls/kernel32/tests/volume.c
+43
-0
No files found.
dlls/kernel32/tests/volume.c
View file @
7c27a969
...
...
@@ -730,6 +730,48 @@ static void test_GetVolumePathNamesForVolumeNameW(void)
ok
(
error
==
ERROR_FILE_NOT_FOUND
,
"expected ERROR_FILE_NOT_FOUND got %u
\n
"
,
error
);
}
static
void
test_cdrom_ioctl
(
void
)
{
char
drive_letter
,
drive_path
[]
=
"A:
\\
"
,
drive_full_path
[]
=
"
\\\\
.
\\
A:"
;
DWORD
bitmask
;
HANDLE
handle
;
bitmask
=
GetLogicalDrives
();
if
(
!
bitmask
)
{
trace
(
"GetLogicalDrives failed : %u
\n
"
,
GetLastError
());
return
;
}
for
(
drive_letter
=
'A'
;
drive_letter
<=
'Z'
;
drive_letter
++
)
{
if
(
!
(
bitmask
&
(
1
<<
(
drive_letter
-
'A'
)
)))
continue
;
drive_path
[
0
]
=
drive_letter
;
if
(
GetDriveTypeA
(
drive_path
)
!=
DRIVE_CDROM
)
{
trace
(
"Skipping %c:, not a CDROM drive.
\n
"
,
drive_letter
);
continue
;
}
trace
(
"Testing with %c:
\n
"
,
drive_letter
);
drive_full_path
[
4
]
=
drive_letter
;
handle
=
CreateFileA
(
drive_full_path
,
GENERIC_READ
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
{
trace
(
"Failed to open the device : %u
\n
"
,
GetLastError
());
continue
;
}
/* Add your tests here */
CloseHandle
(
handle
);
}
}
START_TEST
(
volume
)
{
hdll
=
GetModuleHandleA
(
"kernel32.dll"
);
...
...
@@ -756,4 +798,5 @@ START_TEST(volume)
test_disk_extents
();
test_GetVolumePathNamesForVolumeNameA
();
test_GetVolumePathNamesForVolumeNameW
();
test_cdrom_ioctl
();
}
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