xtest: add --clear-storage option

When unexpected errors occur in the secure storage tests
(regression_6xxx) some persistent objects might be left over, causing
errors in further tests which expect to start from a clean state.
This situation cannot be addressed fully by error handling in xtest or
in the storage TA, because there are unrecoverable conditions (data
abort, kill -9...). Instead, implement a new --clear-storage option
which invokes the storage TA to enumerate and delete any objects it may
own. The TA is invoked twice (because the same code is exposed via two
UUIDS), and each invocation iterates on the two possible filesystems
(TEE_STORAGE_PRIVATE_REE, TEE_STORAGE_PRIVATE_RPMB).

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
diff --git a/Android.mk b/Android.mk
index feb05c6..4c1ebec 100644
--- a/Android.mk
+++ b/Android.mk
@@ -45,6 +45,7 @@
 	aes_perf.c \
 	benchmark_1000.c \
 	benchmark_2000.c \
+	clear_storage.c \
 	regression_4000.c \
 	regression_4100.c \
 	regression_5000.c \