Add xtest 6015 (TA storage separation)

xtest 6015 is added to test storage isolation. It invokes a first TA to
create a persistent object. Then it uses a second TA to try and open an
object with the same name, which is expected to fail. Both TAs are
actually the same except for the UUID.

The test also attempts to simulate a file manipulation in the REE file
system (renaming the storage path of TA1 to match the TA2 directory).
This should fail as well.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU)
Reviewed-by: David Brown <david.brown@linaro.org>
Tested-by: David Brown <david.brown@linaro.org> (Hikey android)
diff --git a/ta/storage2/Android.mk b/ta/storage2/Android.mk
new file mode 100644
index 0000000..98230f2
--- /dev/null
+++ b/ta/storage2/Android.mk
@@ -0,0 +1,4 @@
+LOCAL_PATH := $(call my-dir)
+
+local_module := 731e279e-aafb-4575-a77138caa6f0cca6.ta
+include $(BUILD_OPTEE_MK)
diff --git a/ta/storage2/Makefile b/ta/storage2/Makefile
new file mode 100644
index 0000000..9f0a307
--- /dev/null
+++ b/ta/storage2/Makefile
@@ -0,0 +1,2 @@
+BINARY = 731e279e-aafb-4575-a77138caa6f0cca6
+include ../ta_common.mk
diff --git a/ta/storage2/include/storage.h b/ta/storage2/include/storage.h
new file mode 100644
index 0000000..da39a88
--- /dev/null
+++ b/ta/storage2/include/storage.h
@@ -0,0 +1 @@
+#include "../storage/include/storage.h"
diff --git a/ta/storage2/include/ta_storage.h b/ta/storage2/include/ta_storage.h
new file mode 100644
index 0000000..eec9871
--- /dev/null
+++ b/ta/storage2/include/ta_storage.h
@@ -0,0 +1 @@
+#include "../storage/include/ta_storage.h"
diff --git a/ta/storage2/include/user_ta_header_defines.h b/ta/storage2/include/user_ta_header_defines.h
new file mode 100644
index 0000000..c04ab0b
--- /dev/null
+++ b/ta/storage2/include/user_ta_header_defines.h
@@ -0,0 +1,17 @@
+#ifndef USER_TA_HEADER_DEFINES_H
+#define USER_TA_HEADER_DEFINES_H
+
+#include "ta_storage.h"
+
+#define TA_UUID TA_STORAGE2_UUID
+
+/*
+ * This is important to have TA_FLAG_SINGLE_INSTANCE && !TA_FLAG_MULTI_SESSION
+ * as it is used by the ytest
+ */
+#define TA_FLAGS		(TA_FLAG_USER_MODE | TA_FLAG_EXEC_DDR | \
+				TA_FLAG_SINGLE_INSTANCE)
+#define TA_STACK_SIZE		(2 * 1024)
+#define TA_DATA_SIZE		(32 * 1024)
+
+#endif
diff --git a/ta/storage2/storage.c b/ta/storage2/storage.c
new file mode 100644
index 0000000..a6070b5
--- /dev/null
+++ b/ta/storage2/storage.c
@@ -0,0 +1 @@
+#include "../storage/storage.c"
diff --git a/ta/storage2/sub.mk b/ta/storage2/sub.mk
new file mode 100644
index 0000000..c5a00cb
--- /dev/null
+++ b/ta/storage2/sub.mk
@@ -0,0 +1,3 @@
+global-incdirs-y += include
+srcs-y += storage.c
+srcs-y += ta_entry.c
diff --git a/ta/storage2/ta_entry.c b/ta/storage2/ta_entry.c
new file mode 100644
index 0000000..993605c
--- /dev/null
+++ b/ta/storage2/ta_entry.c
@@ -0,0 +1 @@
+#include "../storage/ta_entry.c"