diff options
author | segfault <toni@impl.cc> | 2020-10-04 08:37:34 -0700 |
---|---|---|
committer | segfault <toni@impl.cc> | 2020-10-04 08:37:34 -0700 |
commit | d00677ccf8eb4029009dccac0f3102b87b230634 (patch) | |
tree | 6088b980f0721bec81d8366887d0e3631c4a0b45 | |
parent | db67fda2a689da4a8a8d8dd32aa6bc1a47246b12 (diff) |
Improved IntegrationTest virt mem alloc tests.
-rw-r--r-- | IntegrationTest/IntegrationTest.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/IntegrationTest/IntegrationTest.cpp b/IntegrationTest/IntegrationTest.cpp index b1a0a29..b7582f7 100644 --- a/IntegrationTest/IntegrationTest.cpp +++ b/IntegrationTest/IntegrationTest.cpp @@ -30,14 +30,19 @@ int main() KM_ASSERT_EQUAL(true, ki.Ping(), "Kernel Interface PING - PONG #3"); { - PVOID addr = (PVOID)0x60000000; + PVOID addr = (PVOID)SHMEM_ADDR; SIZE_T size = 0x100; + + KM_ASSERT_EQUAL(true, + ki.VAlloc((HANDLE)this_pid, &addr, &size, PAGE_READWRITE), "Kernel Interface VirtualAlloc SHMEM_ADDR"); + + addr = NULL; + size = 0x100; + KM_ASSERT_EQUAL(true, ki.VAlloc((HANDLE)this_pid, &addr, &size, PAGE_READWRITE), "Kernel Interface VirtualAlloc"); - //KM_ASSERT_EQUAL(false, - // ki.VAlloc((HANDLE)this_pid, &addr, &size, PAGE_READWRITE), "Kernel Interface VirtualAlloc again should fail"); - //KM_ASSERT_EQUAL(true, - // ki.VFree((HANDLE)this_pid, addr, size), "Kernel Interface VirtualFree"); + KM_ASSERT_EQUAL(true, + ki.VFree((HANDLE)this_pid, addr, size), "Kernel Interface VirtualFree"); } KM_ASSERT_EQUAL(true, ki.Ping(), "Kernel Interface PING - PONG #4"); |