fix: unit test fail due to mpool size
The unit tests fail due to size of mpool, which this
patch increases.
Error it is fixing:
[ RUN ] manifest.ffa_validate_mem_regions
ERROR: Error parsing partition manifest: Hypervisor manifest entry not compatible with Hafnium.
ERROR: Error parsing partition manifest: Memory-region node should have at least one entry.
ERROR: Error parsing partition manifest: Property not found.
ERROR: Empty memory region defined with base address: 0x7300000.
ERROR: Error parsing partition manifest: Memory region should have at least one page.
ERROR: Error parsing partition manifest: Base and relative addresses are mutually exclusive.
ERROR: Error parsing partition manifest: Integer overflow.
ERROR: Error parsing partition manifest: Memory region overlaps with one already allocated.
ERROR: Error parsing partition manifest: Memory region overlaps with one already allocated.
ERROR: Error parsing partition manifest: Memory region overlaps with one already allocated.
ERROR: base_address (0x7300fff) is not aligned to page size.
ERROR: Error parsing partition manifest: Memory region is not aligned to a page boundary.
Panic: memset_s failed as either dest == NULL or destsz > RSIZE_MAX.
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Id3669faedc8a890734dce062e9071a44a955f4e5
diff --git a/src/manifest.c b/src/manifest.c
index c6add64..54d480e 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -118,6 +118,9 @@
{
manifest_data = (struct manifest_data *)mpool_alloc_contiguous(
ppool, manifest_data_ppool_entries, 1);
+
+ assert(manifest_data != NULL);
+
memset_s(manifest_data, sizeof(struct manifest_data), 0,
sizeof(struct manifest_data));
diff --git a/src/manifest_test.cc b/src/manifest_test.cc
index a4e9d33..8452958 100644
--- a/src/manifest_test.cc
+++ b/src/manifest_test.cc
@@ -30,7 +30,7 @@
using struct_manifest = struct manifest;
-constexpr size_t TEST_HEAP_SIZE = PAGE_SIZE * 64;
+constexpr size_t TEST_HEAP_SIZE = PAGE_SIZE * 128;
template <typename T>
void exec(const char *program, const char *args[], const T &stdin,