test(unittests): add tests for slot buffer library

This patch also performs some refactor on the shared realm
test utilities to enable sharing between tests.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I25b2f7ac1caa936b7e38a77051f1b2c863e2f1b0
diff --git a/lib/realm/tests/realm_test_utils.c b/lib/realm/tests/realm_test_utils.c
index b752c5d..9bc3bde 100644
--- a/lib/realm/tests/realm_test_utils.c
+++ b/lib/realm/tests/realm_test_utils.c
@@ -13,7 +13,7 @@
  * NOTE:	This API assumes a 4KB granularity and that the architecture
  *		has a VA space of 48 bits.
  */
-static uintptr_t slot_to_pa(enum buffer_slot slot)
+uintptr_t realm_test_util_slot_to_pa(enum buffer_slot slot)
 {
 	struct xlat_table_entry *entry = get_cache_entry();
 	uintptr_t va = slot_to_va(slot);
@@ -29,10 +29,10 @@
  * mapped the given PA to the VA that would be expected by the
  * aarch64 VMSA.
  */
-uintptr_t realm_test_util_get_slot_va(uintptr_t pa)
+uintptr_t realm_test_util_slot_va_from_pa(uintptr_t pa)
 {
 	for (unsigned int i = 0U; i < NR_CPU_SLOTS; i++) {
-		if (pa == slot_to_pa((enum buffer_slot)i)) {
+		if (pa == realm_test_util_slot_to_pa((enum buffer_slot)i)) {
 			/*
 			 * Found a slot returning the same address, get
 			 * the VA for that slot (the one that would be