=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ntdll/tests: Add ARM support for map protection tests.

Alexandre Julliard julliard at winehq.org
Tue Dec 10 14:44:06 CST 2013


Module: wine
Branch: master
Commit: 51ec8af230fe073ce9b8b32cb509752250909dfa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=51ec8af230fe073ce9b8b32cb509752250909dfa

Author: André Hentschel <nerv at dawncrow.de>
Date:   Mon Dec  9 21:06:29 2013 +0100

ntdll/tests: Add ARM support for map protection tests.

---

 dlls/ntdll/tests/info.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index 21e3cff..ca7cbdb 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -1359,12 +1359,17 @@ static void test_mapprotection(void)
     addr = NULL;
     status = pNtMapViewOfSection ( h, GetCurrentProcess(), &addr, 0, 0, &offset, &count, ViewShare, 0, PAGE_READWRITE);
     ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
+
 #if defined(__x86_64__) || defined(__i386__)
-    memset (addr, 0xc3, 1); /* lret ... in both i386 and x86_64 */
+    *(unsigned char*)addr = 0xc3;       /* lret ... in both i386 and x86_64 */
+#elif defined(__arm__)
+    *(unsigned long*)addr = 0xe12fff1e; /* bx lr */
+#else
+    ok(0, "Add a return opcode for your architecture or expect a crash in this test\n");
+#endif
     trace("trying to execute code in the readwrite only mapped anon file...\n");
     f = addr;f();
     trace("...done.\n");
-#endif
 
     status = pNtQueryVirtualMemory( GetCurrentProcess(), addr, MemoryBasicInformation, &info, sizeof(info), &retlen );
     ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);




More information about the wine-cvs mailing list