test(xlat) : fix testcase xlat v2: Stress test
Testcase fails when test tries to unmap memory region
with size=0, mapping region with size=0 was success,
added workaround to skip mapping if size=0,
Will need to be fixed in xlat library later.
Change-Id: Icf326cf4889b833e1bd9e064eeeb1f309ae147c6
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
diff --git a/tftf/tests/xlat_lib_v2/xlat_lib_v2_tests.c b/tftf/tests/xlat_lib_v2/xlat_lib_v2_tests.c
index 519ff16..c4ffbf9 100644
--- a/tftf/tests/xlat_lib_v2/xlat_lib_v2_tests.c
+++ b/tftf/tests/xlat_lib_v2/xlat_lib_v2_tests.c
@@ -163,6 +163,9 @@
{
int ret;
+ if (size == 0U) {
+ return -EPERM;
+ }
VERBOSE("mmap_add_dynamic_region(0x%llx, 0x%lx, 0x%zx, 0x%x)\n",
base_pa, base_va, size, attr);