Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
d7027336
Commit
d7027336
authored
Jul 11, 2022
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jul 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add RtlFirstFreeAce tests.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
parent
0cc26c12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
rtl.c
dlls/ntdll/tests/rtl.c
+49
-0
No files found.
dlls/ntdll/tests/rtl.c
View file @
d7027336
...
...
@@ -3682,6 +3682,54 @@ static void test_RtlDestroyHeap(void)
RtlRemoveVectoredExceptionHandler
(
handler
);
}
static
void
test_RtlFirstFreeAce
(
void
)
{
PACL
acl
;
PACE_HEADER
first
;
BOOL
ret
;
DWORD
size
;
BOOLEAN
found
;
size
=
sizeof
(
ACL
)
+
(
sizeof
(
ACCESS_ALLOWED_ACE
));
acl
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
ret
=
InitializeAcl
(
acl
,
sizeof
(
ACL
),
ACL_REVISION
);
ok
(
ret
,
"InitializeAcl failed with error %ld
\n
"
,
GetLastError
());
/* AceCount = 0 */
first
=
(
ACE_HEADER
*
)
0xdeadbeef
;
found
=
RtlFirstFreeAce
(
acl
,
&
first
);
ok
(
found
,
"RtlFirstFreeAce failed
\n
"
);
ok
(
first
==
(
PACE_HEADER
)(
acl
+
1
),
"Failed to find ACL
\n
"
);
acl
->
AclSize
=
sizeof
(
ACL
)
-
1
;
first
=
(
ACE_HEADER
*
)
0xdeadbeef
;
found
=
RtlFirstFreeAce
(
acl
,
&
first
);
ok
(
found
,
"RtlFirstFreeAce failed
\n
"
);
ok
(
first
==
NULL
,
"Found FirstAce = %p
\n
"
,
first
);
/* AceCount = 1 */
acl
->
AceCount
=
1
;
acl
->
AclSize
=
size
;
first
=
(
ACE_HEADER
*
)
0xdeadbeef
;
found
=
RtlFirstFreeAce
(
acl
,
&
first
);
ok
(
found
,
"RtlFirstFreeAce failed
\n
"
);
ok
(
first
==
(
PACE_HEADER
)(
acl
+
1
),
"Failed to find ACL %p, %p
\n
"
,
first
,
(
PACE_HEADER
)(
acl
+
1
));
acl
->
AclSize
=
sizeof
(
ACL
)
-
1
;
first
=
(
ACE_HEADER
*
)
0xdeadbeef
;
found
=
RtlFirstFreeAce
(
acl
,
&
first
);
ok
(
!
found
,
"RtlFirstFreeAce failed
\n
"
);
ok
(
first
==
NULL
,
"Found FirstAce = %p
\n
"
,
first
);
acl
->
AclSize
=
sizeof
(
ACL
);
first
=
(
ACE_HEADER
*
)
0xdeadbeef
;
found
=
RtlFirstFreeAce
(
acl
,
&
first
);
ok
(
!
found
,
"RtlFirstFreeAce failed
\n
"
);
ok
(
first
==
NULL
,
"Found FirstAce = %p
\n
"
,
first
);
HeapFree
(
GetProcessHeap
(),
0
,
acl
);
}
START_TEST
(
rtl
)
{
InitFunctionPtrs
();
...
...
@@ -3725,4 +3773,5 @@ START_TEST(rtl)
test_LdrRegisterDllNotification
();
test_DbgPrint
();
test_RtlDestroyHeap
();
test_RtlFirstFreeAce
();
}
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