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
b7a8eefb
Commit
b7a8eefb
authored
Feb 11, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Authors: Francois Gouget <fgouget@free.fr>, With help from Enio Schutt Jr <enio.s.jr@operamail.com>
Skip the overlapped I/O tests on files on Win9x.
parent
1998beae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
19 deletions
+28
-19
file.c
dlls/kernel/tests/file.c
+28
-19
No files found.
dlls/kernel/tests/file.c
View file @
b7a8eefb
...
@@ -609,6 +609,7 @@ void test_offset_in_overlapped_structure(void)
...
@@ -609,6 +609,7 @@ void test_offset_in_overlapped_structure(void)
HANDLE
hFile
;
HANDLE
hFile
;
OVERLAPPED
ov
;
OVERLAPPED
ov
;
DWORD
done
;
DWORD
done
;
BOOL
rc
;
BYTE
buf
[
256
],
pattern
[]
=
"TeSt"
;
BYTE
buf
[
256
],
pattern
[]
=
"TeSt"
;
UINT
i
;
UINT
i
;
char
temp_path
[
MAX_PATH
],
temp_fname
[
MAX_PATH
];
char
temp_path
[
MAX_PATH
],
temp_fname
[
MAX_PATH
];
...
@@ -628,19 +629,23 @@ void test_offset_in_overlapped_structure(void)
...
@@ -628,19 +629,23 @@ void test_offset_in_overlapped_structure(void)
memset
(
&
ov
,
0
,
sizeof
(
ov
));
memset
(
&
ov
,
0
,
sizeof
(
ov
));
ov
.
Offset
=
PATTERN_OFFSET
;
ov
.
Offset
=
PATTERN_OFFSET
;
ov
.
OffsetHigh
=
0
;
ov
.
OffsetHigh
=
0
;
ok
(
WriteFile
(
hFile
,
pattern
,
sizeof
(
pattern
),
&
done
,
&
ov
),
"WriteFile error %ld"
,
GetLastError
());
rc
=
WriteFile
(
hFile
,
pattern
,
sizeof
(
pattern
),
&
done
,
&
ov
);
ok
(
done
==
sizeof
(
pattern
),
"expected number of bytes written %lu"
,
done
);
/* Win 9x does not support the overlapped I/O on files */
trace
(
"Current offset = %04lx
\n
"
,
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
));
if
(
rc
||
GetLastError
()
!=
ERROR_INVALID_PARAMETER
)
{
ok
(
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
)
==
(
PATTERN_OFFSET
+
sizeof
(
pattern
)),
ok
(
rc
,
"WriteFile error %ld"
,
GetLastError
());
"expected file offset %d"
,
PATTERN_OFFSET
+
sizeof
(
pattern
));
ok
(
done
==
sizeof
(
pattern
),
"expected number of bytes written %lu"
,
done
);
trace
(
"Current offset = %04lx
\n
"
,
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
));
ov
.
Offset
=
sizeof
(
buf
)
*
2
;
ok
(
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
)
==
(
PATTERN_OFFSET
+
sizeof
(
pattern
)),
ov
.
OffsetHigh
=
0
;
"expected file offset %d"
,
PATTERN_OFFSET
+
sizeof
(
pattern
));
ok
(
WriteFile
(
hFile
,
pattern
,
sizeof
(
pattern
),
&
done
,
&
ov
),
"WriteFile error %ld"
,
GetLastError
());
ok
(
done
==
sizeof
(
pattern
),
"expected number of bytes written %lu"
,
done
);
ov
.
Offset
=
sizeof
(
buf
)
*
2
;
/*trace("Current offset = %04lx\n", SetFilePointer(hFile, 0, NULL, FILE_CURRENT));*/
ov
.
OffsetHigh
=
0
;
ok
(
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
)
==
(
sizeof
(
buf
)
*
2
+
sizeof
(
pattern
)),
ok
(
WriteFile
(
hFile
,
pattern
,
sizeof
(
pattern
),
&
done
,
&
ov
),
"WriteFile error %ld"
,
GetLastError
());
"expected file offset %d"
,
sizeof
(
buf
)
*
2
+
sizeof
(
pattern
));
ok
(
done
==
sizeof
(
pattern
),
"expected number of bytes written %lu"
,
done
);
/*trace("Current offset = %04lx\n", SetFilePointer(hFile, 0, NULL, FILE_CURRENT));*/
ok
(
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
)
==
(
sizeof
(
buf
)
*
2
+
sizeof
(
pattern
)),
"expected file offset %d"
,
sizeof
(
buf
)
*
2
+
sizeof
(
pattern
));
}
CloseHandle
(
hFile
);
CloseHandle
(
hFile
);
...
@@ -653,12 +658,16 @@ void test_offset_in_overlapped_structure(void)
...
@@ -653,12 +658,16 @@ void test_offset_in_overlapped_structure(void)
memset
(
&
ov
,
0
,
sizeof
(
ov
));
memset
(
&
ov
,
0
,
sizeof
(
ov
));
ov
.
Offset
=
PATTERN_OFFSET
;
ov
.
Offset
=
PATTERN_OFFSET
;
ov
.
OffsetHigh
=
0
;
ov
.
OffsetHigh
=
0
;
ok
(
ReadFile
(
hFile
,
buf
,
sizeof
(
pattern
),
&
done
,
&
ov
),
"ReadFile error %ld"
,
GetLastError
());
rc
=
ReadFile
(
hFile
,
buf
,
sizeof
(
pattern
),
&
done
,
&
ov
);
ok
(
done
==
sizeof
(
pattern
),
"expected number of bytes read %lu"
,
done
);
/* Win 9x does not support the overlapped I/O on files */
trace
(
"Current offset = %04lx
\n
"
,
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
));
if
(
rc
||
GetLastError
()
!=
ERROR_INVALID_PARAMETER
)
{
ok
(
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
)
==
(
PATTERN_OFFSET
+
sizeof
(
pattern
)),
ok
(
rc
,
"ReadFile error %ld"
,
GetLastError
());
"expected file offset %d"
,
PATTERN_OFFSET
+
sizeof
(
pattern
));
ok
(
done
==
sizeof
(
pattern
),
"expected number of bytes read %lu"
,
done
);
ok
(
!
memcmp
(
buf
,
pattern
,
sizeof
(
pattern
)),
"pattern match failed"
);
trace
(
"Current offset = %04lx
\n
"
,
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
));
ok
(
SetFilePointer
(
hFile
,
0
,
NULL
,
FILE_CURRENT
)
==
(
PATTERN_OFFSET
+
sizeof
(
pattern
)),
"expected file offset %d"
,
PATTERN_OFFSET
+
sizeof
(
pattern
));
ok
(
!
memcmp
(
buf
,
pattern
,
sizeof
(
pattern
)),
"pattern match failed"
);
}
CloseHandle
(
hFile
);
CloseHandle
(
hFile
);
...
...
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