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
3172b854
Commit
3172b854
authored
Aug 09, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add some tests for setting file times.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
70189853
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
file.c
dlls/ntdll/tests/file.c
+25
-1
No files found.
dlls/ntdll/tests/file.c
View file @
3172b854
...
...
@@ -1313,8 +1313,8 @@ static void test_file_full_size_information(void)
static
void
test_file_basic_information
(
void
)
{
FILE_BASIC_INFORMATION
fbi
,
fbi2
;
IO_STATUS_BLOCK
io
;
FILE_BASIC_INFORMATION
fbi
;
HANDLE
h
;
int
res
;
int
attrib_mask
=
FILE_ATTRIBUTE_SYSTEM
|
FILE_ATTRIBUTE_HIDDEN
|
FILE_ATTRIBUTE_NORMAL
;
...
...
@@ -1328,6 +1328,30 @@ static void test_file_basic_information(void)
ok
(
(
fbi
.
FileAttributes
&
FILE_ATTRIBUTE_ARCHIVE
)
==
FILE_ATTRIBUTE_ARCHIVE
,
"attribute %x not expected
\n
"
,
fbi
.
FileAttributes
);
memset
(
&
fbi2
,
0
,
sizeof
(
fbi2
));
fbi2
.
LastWriteTime
.
QuadPart
=
-
1
;
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fbi2
,
sizeof
fbi2
,
FileBasicInformation
);
todo_wine
{
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
(
&
fbi2
,
0
,
sizeof
(
fbi2
));
res
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fbi2
,
sizeof
fbi2
,
FileBasicInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"can't get attributes, res %x
\n
"
,
res
);
ok
(
fbi2
.
LastWriteTime
.
QuadPart
==
fbi
.
LastWriteTime
.
QuadPart
,
"unexpected write time.
\n
"
);
memset
(
&
fbi2
,
0
,
sizeof
(
fbi2
));
U
(
io
).
Status
=
0xdeadbeef
;
res
=
pNtSetInformationFile
(
h
,
&
io
,
&
fbi2
,
sizeof
fbi2
,
FileBasicInformation
);
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
(
&
fbi2
,
0
,
sizeof
(
fbi2
));
res
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fbi2
,
sizeof
fbi2
,
FileBasicInformation
);
ok
(
res
==
STATUS_SUCCESS
,
"can't get attributes, res %x
\n
"
,
res
);
ok
(
fbi2
.
LastWriteTime
.
QuadPart
==
fbi
.
LastWriteTime
.
QuadPart
,
"unexpected write time.
\n
"
);
/* Then SYSTEM */
/* Clear fbi to avoid setting times */
memset
(
&
fbi
,
0
,
sizeof
(
fbi
));
...
...
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