Author: gadamopoulos
Date: Thu Jan 12 11:21:04 2017
New Revision: 73526
URL:
http://svn.reactos.org/svn/reactos?rev=73526&view=rev
Log:
[NTDLL] -Add preliminary tests for RtlDosApplyFileIsolationRedirection_Ustr.
Added:
trunk/rostests/apitests/ntdll/RtlDosApplyFileIsolationRedirection_Ustr.c (with
props)
Modified:
trunk/rostests/apitests/ntdll/CMakeLists.txt
trunk/rostests/apitests/ntdll/testlist.c
Modified: trunk/rostests/apitests/ntdll/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/CMakeLists…
==============================================================================
--- trunk/rostests/apitests/ntdll/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/CMakeLists.txt [iso-8859-1] Thu Jan 12 11:21:04 2017
@@ -28,6 +28,7 @@
RtlDeleteAce.c
RtlDetermineDosPathNameType.c
RtlDoesFileExists.c
+ RtlDosApplyFileIsolationRedirection_Ustr.c
RtlDosPathNameToNtPathName_U.c
RtlDosSearchPath_U.c
RtlDosSearchPath_Ustr.c
Added: trunk/rostests/apitests/ntdll/RtlDosApplyFileIsolationRedirection_Ustr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlDosAppl…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlDosApplyFileIsolationRedirection_Ustr.c (added)
+++ trunk/rostests/apitests/ntdll/RtlDosApplyFileIsolationRedirection_Ustr.c [iso-8859-1]
Thu Jan 12 11:21:04 2017
@@ -0,0 +1,84 @@
+/*
+ * PROJECT: ReactOS api tests
+ * LICENSE: GPLv2+ - See COPYING in the top level directory
+ * PURPOSE: Test for RtlDosApplyFileIsolationRedirection_Ustr
+ * PROGRAMMER: Giannis Adamopoulos
+ */
+
+#include <apitest.h>
+
+#define WIN32_NO_STATUS
+#include <ndk/rtlfuncs.h>
+
+#define ok_eq_hex(value, expected) ok((value) == (expected), #value " = 0x%lx,
expected 0x%lx\n", value, expected)
+#define ok_eq_pointer(value, expected) ok((value) == (expected), #value " = %p,
expected %p\n", value, expected)
+
+UNICODE_STRING DotDll = RTL_CONSTANT_STRING(L".DLL");
+
+void TestDefaultSxsRedirection(void)
+{
+ UNICODE_STRING GdiPlusSXS =
RTL_CONSTANT_STRING(L"\\WinSxS\\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.");
+ UNICODE_STRING Comctl32SXS =
RTL_CONSTANT_STRING(L"\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82");
+ UNICODE_STRING Comctl32 = RTL_CONSTANT_STRING(L"COMCTL32.DLL");
+ UNICODE_STRING GdiPlus = RTL_CONSTANT_STRING(L"GDIPLUS.DLL");
+ UNICODE_STRING CallerBuffer;
+ UNICODE_STRING DynamicString;
+ PUNICODE_STRING FullNameOut;
+ USHORT Position;
+
+ NTSTATUS Status;
+
+ /* NOTE: in xp and 2k3 gdiplus does not exist in system32 */
+ RtlInitUnicodeString(&CallerBuffer, NULL);
+ RtlInitUnicodeString(&DynamicString, NULL);
+ FullNameOut = NULL;
+ Status = RtlDosApplyFileIsolationRedirection_Ustr(TRUE,
+ &GdiPlus,
+ &DotDll,
+ &CallerBuffer,
+ &DynamicString,
+ &FullNameOut,
+ NULL,
+ NULL,
+ NULL);
+ ok_eq_hex(Status, STATUS_SUCCESS);
+ ok_eq_pointer(CallerBuffer.Buffer, NULL);
+ ok_eq_pointer(FullNameOut, &DynamicString);
+ Status =
RtlFindCharInUnicodeString(RTL_FIND_CHAR_IN_UNICODE_STRING_CASE_INSENSITIVE,
+ &GdiPlusSXS,
+ &DynamicString,
+ &Position);
+ ok_eq_hex(Status, STATUS_SUCCESS);
+
+
+ RtlInitUnicodeString(&CallerBuffer, NULL);
+ RtlInitUnicodeString(&DynamicString, NULL);
+ FullNameOut = NULL;
+ Status = RtlDosApplyFileIsolationRedirection_Ustr(TRUE,
+ &Comctl32,
+ &DotDll,
+ &CallerBuffer,
+ &DynamicString,
+ &FullNameOut,
+ NULL,
+ NULL,
+ NULL);
+ ok_eq_hex(Status, STATUS_SUCCESS);
+ ok_eq_pointer(CallerBuffer.Buffer, NULL);
+ ok_eq_pointer(FullNameOut, &DynamicString);
+ Status =
RtlFindCharInUnicodeString(RTL_FIND_CHAR_IN_UNICODE_STRING_CASE_INSENSITIVE,
+ &Comctl32SXS,
+ &DynamicString,
+ &Position);
+ ok_eq_hex(Status, STATUS_SUCCESS);
+}
+
+void TestDotLocal(void)
+{
+}
+
+START_TEST(RtlDosApplyFileIsolationRedirection_Ustr)
+{
+ TestDotLocal();
+ TestDefaultSxsRedirection();
+}
Propchange: trunk/rostests/apitests/ntdll/RtlDosApplyFileIsolationRedirection_Ustr.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/rostests/apitests/ntdll/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/testlist.c…
==============================================================================
--- trunk/rostests/apitests/ntdll/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/testlist.c [iso-8859-1] Thu Jan 12 11:21:04 2017
@@ -31,6 +31,7 @@
extern void func_RtlCopyMappedMemory(void);
extern void func_RtlDeleteAce(void);
extern void func_RtlDetermineDosPathNameType(void);
+extern void func_RtlDosApplyFileIsolationRedirection_Ustr(void);
extern void func_RtlDoesFileExists(void);
extern void func_RtlDosPathNameToNtPathName_U(void);
extern void func_RtlDosSearchPath_U(void);
@@ -81,6 +82,7 @@
{ "RtlCopyMappedMemory", func_RtlCopyMappedMemory },
{ "RtlDeleteAce", func_RtlDeleteAce },
{ "RtlDetermineDosPathNameType", func_RtlDetermineDosPathNameType },
+ { "RtlDosApplyFileIsolationRedirection_Ustr",
func_RtlDosApplyFileIsolationRedirection_Ustr },
{ "RtlDoesFileExists", func_RtlDoesFileExists },
{ "RtlDosPathNameToNtPathName_U", func_RtlDosPathNameToNtPathName_U },
{ "RtlDosSearchPath_U", func_RtlDosSearchPath_U },