Merge pull request #1498 from Kritzefitz/splitting-mmio-unmap-test

Add test case for #1497
This commit is contained in:
lazymio 2021-11-23 23:24:00 +01:00 committed by GitHub
commit 715cabad7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,8 +74,22 @@ static void test_splitting_mem_unmap()
OK(uc_close(uc));
}
static void test_splitting_mmio_unmap()
{
uc_engine *uc;
OK(uc_open(UC_ARCH_X86, UC_MODE_32, &uc));
OK(uc_mmio_map(uc, 0x3000, 0x2000, NULL, NULL, NULL, NULL));
OK(uc_mem_unmap(uc, 0x3000, 0x1000));
OK(uc_close(uc));
}
TEST_LIST = {{"test_map_correct", test_map_correct},
{"test_map_wrapping", test_map_wrapping},
{"test_mem_protect", test_mem_protect},
{"test_splitting_mem_unmap", test_splitting_mem_unmap},
{"test_x86_splitting_mmio_unmap", test_splitting_mmio_unmap},
{NULL, NULL}};