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
fd66d618
Commit
fd66d618
authored
Jul 27, 2010
by
Reece Dunn
Committed by
Alexandre Julliard
Jul 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: check io.Status in the file tests.
parent
cf6d9d69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
file.c
dlls/ntdll/tests/file.c
+26
-8
No files found.
dlls/ntdll/tests/file.c
View file @
fd66d618
...
...
@@ -947,8 +947,11 @@ static void test_iocp_fileio(HANDLE h)
ok
(
hPipeClt
!=
INVALID_HANDLE_VALUE
,
"Cannot connect to pipe
\n
"
);
if
(
hPipeClt
!=
INVALID_HANDLE_VALUE
)
{
U
(
iosb
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
hPipeSrv
,
&
iosb
,
&
fci
,
sizeof
(
fci
),
FileCompletionInformation
);
ok
(
res
==
STATUS_INVALID_PARAMETER
,
"Unexpected NtSetInformationFile on non-overlapped handle: %x
\n
"
,
res
);
ok
(
U
(
iosb
).
Status
==
STATUS_INVALID_PARAMETER
/* 98 */
||
U
(
iosb
).
Status
==
0xdeadbeef
/* NT4+ */
,
"Unexpected iosb.Status on non-overlapped handle: %x
\n
"
,
U
(
iosb
).
Status
);
CloseHandle
(
hPipeClt
);
}
CloseHandle
(
hPipeSrv
);
...
...
@@ -968,7 +971,8 @@ static void test_iocp_fileio(HANDLE h)
DWORD
read
;
long
count
;
NTSTATUS
res
=
pNtSetInformationFile
(
hPipeSrv
,
&
iosb
,
&
fci
,
sizeof
(
fci
),
FileCompletionInformation
);
U
(
iosb
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
hPipeSrv
,
&
iosb
,
&
fci
,
sizeof
(
fci
),
FileCompletionInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"NtSetInformationFile failed: %x
\n
"
,
res
);
ok
(
U
(
iosb
).
Status
==
STATUS_SUCCESS
,
"iosb.Status invalid: %x
\n
"
,
U
(
iosb
).
Status
);
...
...
@@ -1047,8 +1051,10 @@ static void test_file_basic_information(void)
/* Clear fbi to avoid setting times */
memset
(
&
fbi
,
0
,
sizeof
(
fbi
));
fbi
.
FileAttributes
=
FILE_ATTRIBUTE_SYSTEM
;
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fbi
,
sizeof
fbi
,
FileBasicInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute
\n
"
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute, NtSetInformationFile returned %x
\n
"
,
res
);
ok
(
U
(
io
).
Status
==
STATUS_SUCCESS
,
"can't set system attribute, io.Status is %x
\n
"
,
U
(
io
).
Status
);
memset
(
&
fbi
,
0
,
sizeof
(
fbi
));
res
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fbi
,
sizeof
fbi
,
FileBasicInformation
);
...
...
@@ -1058,8 +1064,10 @@ static void test_file_basic_information(void)
/* Then HIDDEN */
memset
(
&
fbi
,
0
,
sizeof
(
fbi
));
fbi
.
FileAttributes
=
FILE_ATTRIBUTE_HIDDEN
;
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fbi
,
sizeof
fbi
,
FileBasicInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute
\n
"
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute, NtSetInformationFile returned %x
\n
"
,
res
);
ok
(
U
(
io
).
Status
==
STATUS_SUCCESS
,
"can't set system attribute, io.Status is %x
\n
"
,
U
(
io
).
Status
);
memset
(
&
fbi
,
0
,
sizeof
(
fbi
));
res
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fbi
,
sizeof
fbi
,
FileBasicInformation
);
...
...
@@ -1069,8 +1077,10 @@ static void test_file_basic_information(void)
/* Check NORMAL last of all (to make sure we can clear attributes) */
memset
(
&
fbi
,
0
,
sizeof
(
fbi
));
fbi
.
FileAttributes
=
FILE_ATTRIBUTE_NORMAL
;
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fbi
,
sizeof
fbi
,
FileBasicInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set normal attribute
\n
"
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set normal attribute, NtSetInformationFile returned %x
\n
"
,
res
);
ok
(
U
(
io
).
Status
==
STATUS_SUCCESS
,
"can't set normal attribute, io.Status is %x
\n
"
,
U
(
io
).
Status
);
memset
(
&
fbi
,
0
,
sizeof
(
fbi
));
res
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fbi
,
sizeof
fbi
,
FileBasicInformation
);
...
...
@@ -1107,10 +1117,14 @@ static void test_file_all_information(void)
/* Clear fbi to avoid setting times */
memset
(
&
fai_buf
.
fai
.
BasicInformation
,
0
,
sizeof
(
fai_buf
.
fai
.
BasicInformation
));
fai_buf
.
fai
.
BasicInformation
.
FileAttributes
=
FILE_ATTRIBUTE_SYSTEM
;
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fai_buf
.
fai
,
sizeof
fai_buf
,
FileAllInformation
);
ok
(
res
==
STATUS_INVALID_INFO_CLASS
||
res
==
STATUS_NOT_IMPLEMENTED
,
"shouldn't be able to set FileAllInformation, res %x
\n
"
,
res
);
ok
(
res
==
STATUS_INVALID_INFO_CLASS
||
broken
(
res
==
STATUS_NOT_IMPLEMENTED
),
"shouldn't be able to set FileAllInformation, res %x
\n
"
,
res
);
todo_wine
ok
(
U
(
io
).
Status
==
0xdeadbeef
,
"shouldn't be able to set FileAllInformation, io.Status is %x
\n
"
,
U
(
io
).
Status
);
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fai_buf
.
fai
.
BasicInformation
,
sizeof
fai_buf
.
fai
.
BasicInformation
,
FileBasicInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute
\n
"
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute, res: %x
\n
"
,
res
);
ok
(
U
(
io
).
Status
==
STATUS_SUCCESS
,
"can't set system attribute, io.Status: %x
\n
"
,
U
(
io
).
Status
);
memset
(
&
fai_buf
.
fai
,
0
,
sizeof
(
fai_buf
.
fai
));
res
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fai_buf
.
fai
,
sizeof
fai_buf
,
FileAllInformation
);
...
...
@@ -1120,8 +1134,10 @@ static void test_file_all_information(void)
/* Then HIDDEN */
memset
(
&
fai_buf
.
fai
.
BasicInformation
,
0
,
sizeof
(
fai_buf
.
fai
.
BasicInformation
));
fai_buf
.
fai
.
BasicInformation
.
FileAttributes
=
FILE_ATTRIBUTE_HIDDEN
;
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fai_buf
.
fai
.
BasicInformation
,
sizeof
fai_buf
.
fai
.
BasicInformation
,
FileBasicInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute
\n
"
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute, res: %x
\n
"
,
res
);
ok
(
U
(
io
).
Status
==
STATUS_SUCCESS
,
"can't set system attribute, io.Status: %x
\n
"
,
U
(
io
).
Status
);
memset
(
&
fai_buf
.
fai
,
0
,
sizeof
(
fai_buf
.
fai
));
res
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fai_buf
.
fai
,
sizeof
fai_buf
,
FileAllInformation
);
...
...
@@ -1131,8 +1147,10 @@ static void test_file_all_information(void)
/* Check NORMAL last of all (to make sure we can clear attributes) */
memset
(
&
fai_buf
.
fai
.
BasicInformation
,
0
,
sizeof
(
fai_buf
.
fai
.
BasicInformation
));
fai_buf
.
fai
.
BasicInformation
.
FileAttributes
=
FILE_ATTRIBUTE_NORMAL
;
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fai_buf
.
fai
.
BasicInformation
,
sizeof
fai_buf
.
fai
.
BasicInformation
,
FileBasicInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set normal attribute
\n
"
);
ok
(
res
==
STATUS_SUCCESS
,
"can't set system attribute, res: %x
\n
"
,
res
);
ok
(
U
(
io
).
Status
==
STATUS_SUCCESS
,
"can't set system attribute, io.Status: %x
\n
"
,
U
(
io
).
Status
);
memset
(
&
fai_buf
.
fai
,
0
,
sizeof
(
fai_buf
.
fai
));
res
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fai_buf
.
fai
,
sizeof
fai_buf
,
FileAllInformation
);
...
...
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