]> granicus.if.org Git - esp-idf/commitdiff
Add test for partition mmap straddling 64K page issue
authorJeroen Domburg <jeroen@espressif.com>
Thu, 6 Jul 2017 10:22:43 +0000 (18:22 +0800)
committerJeroen Domburg <jeroen@espressif.com>
Thu, 6 Jul 2017 10:22:43 +0000 (18:22 +0800)
components/partition_table/test/test_partition.c

index 64ead9692c84f3368c80e78d77d20040d2a75cba..5267b5bac728e34489f897005449075cd024c78e 100644 (file)
@@ -73,7 +73,7 @@ TEST_CASE("Can write, read, mmap partition", "[partition][ignore]")
     const uint32_t *mmap_data;
     spi_flash_mmap_handle_t mmap_handle;
     size_t begin = 3000;
-    size_t size = 12000;
+    size_t size = 64000; //chosen so size is smaller than 64K but the mmap straddles 2 MMU blocks
     TEST_ASSERT_EQUAL(ESP_OK, esp_partition_mmap(p, begin, size, SPI_FLASH_MMAP_DATA,
                       (const void **)&mmap_data, &mmap_handle));
     srand(0);