Test: Remove test_share_redirection

As scratch area is going to be removed, remove the unused test of
test_share_redirection.

Change-Id: I993076a81aa0b2812e6f7b10902780949db82513
Signed-off-by: Shawn Shan <shawn.shan@arm.com>
diff --git a/interface/include/psa_manifest/sid.h b/interface/include/psa_manifest/sid.h
index 69fcfab..49169ee 100644
--- a/interface/include/psa_manifest/sid.h
+++ b/interface/include/psa_manifest/sid.h
@@ -46,23 +46,21 @@
 #define SPM_CORE_TEST_MPU_ACCESS_VERSION                           (1U)
 #define SPM_CORE_TEST_MEMORY_PERMISSIONS_SID                       (0x0000F023U)
 #define SPM_CORE_TEST_MEMORY_PERMISSIONS_VERSION                   (1U)
-#define SPM_CORE_TEST_SHARE_REDIRECTION_SID                        (0x0000F024U)
-#define SPM_CORE_TEST_SHARE_REDIRECTION_VERSION                    (1U)
-#define SPM_CORE_TEST_SS_TO_SS_SID                                 (0x0000F025U)
+#define SPM_CORE_TEST_SS_TO_SS_SID                                 (0x0000F024U)
 #define SPM_CORE_TEST_SS_TO_SS_VERSION                             (1U)
-#define SPM_CORE_TEST_SS_TO_SS_BUFFER_SID                          (0x0000F026U)
+#define SPM_CORE_TEST_SS_TO_SS_BUFFER_SID                          (0x0000F025U)
 #define SPM_CORE_TEST_SS_TO_SS_BUFFER_VERSION                      (1U)
-#define SPM_CORE_TEST_OUTVEC_WRITE_SID                             (0x0000F027U)
+#define SPM_CORE_TEST_OUTVEC_WRITE_SID                             (0x0000F026U)
 #define SPM_CORE_TEST_OUTVEC_WRITE_VERSION                         (1U)
-#define SPM_CORE_TEST_PERIPHERAL_ACCESS_SID                        (0x0000F028U)
+#define SPM_CORE_TEST_PERIPHERAL_ACCESS_SID                        (0x0000F027U)
 #define SPM_CORE_TEST_PERIPHERAL_ACCESS_VERSION                    (1U)
-#define SPM_CORE_TEST_GET_CALLER_CLIENT_ID_SID                     (0x0000F029U)
+#define SPM_CORE_TEST_GET_CALLER_CLIENT_ID_SID                     (0x0000F028U)
 #define SPM_CORE_TEST_GET_CALLER_CLIENT_ID_VERSION                 (1U)
-#define SPM_CORE_TEST_SPM_REQUEST_SID                              (0x0000F02AU)
+#define SPM_CORE_TEST_SPM_REQUEST_SID                              (0x0000F029U)
 #define SPM_CORE_TEST_SPM_REQUEST_VERSION                          (1U)
-#define SPM_CORE_TEST_BLOCK_SID                                    (0x0000F02BU)
+#define SPM_CORE_TEST_BLOCK_SID                                    (0x0000F02AU)
 #define SPM_CORE_TEST_BLOCK_VERSION                                (1U)
-#define SPM_CORE_TEST_NS_THREAD_SID                                (0x0000F02CU)
+#define SPM_CORE_TEST_NS_THREAD_SID                                (0x0000F02BU)
 #define SPM_CORE_TEST_NS_THREAD_VERSION                            (1U)
 #endif /* TFM_PARTITION_TEST_CORE */
 
diff --git a/secure_fw/services/tfm_service_list.inc b/secure_fw/services/tfm_service_list.inc
index 5a25771..1d41c77 100644
--- a/secure_fw/services/tfm_service_list.inc
+++ b/secure_fw/services/tfm_service_list.inc
@@ -141,19 +141,10 @@
         .minor_policy = TFM_VERSION_POLICY_STRICT
     },
     {
-        .name = "SPM_CORE_TEST_SHARE_REDIRECTION",
-        .partition_id = TFM_SP_CORE_TEST_ID,
-        .signal = SPM_CORE_TEST_SHARE_REDIRECTION_SIGNAL,
-        .sid = 0x0000F024,
-        .non_secure_client = true,
-        .minor_version = 1,
-        .minor_policy = TFM_VERSION_POLICY_STRICT
-    },
-    {
         .name = "SPM_CORE_TEST_SS_TO_SS",
         .partition_id = TFM_SP_CORE_TEST_ID,
         .signal = SPM_CORE_TEST_SS_TO_SS_SIGNAL,
-        .sid = 0x0000F025,
+        .sid = 0x0000F024,
         .non_secure_client = true,
         .minor_version = 1,
         .minor_policy = TFM_VERSION_POLICY_STRICT
@@ -162,7 +153,7 @@
         .name = "SPM_CORE_TEST_SS_TO_SS_BUFFER",
         .partition_id = TFM_SP_CORE_TEST_ID,
         .signal = SPM_CORE_TEST_SS_TO_SS_BUFFER_SIGNAL,
-        .sid = 0x0000F026,
+        .sid = 0x0000F025,
         .non_secure_client = true,
         .minor_version = 1,
         .minor_policy = TFM_VERSION_POLICY_STRICT
@@ -171,7 +162,7 @@
         .name = "SPM_CORE_TEST_OUTVEC_WRITE",
         .partition_id = TFM_SP_CORE_TEST_ID,
         .signal = SPM_CORE_TEST_OUTVEC_WRITE_SIGNAL,
-        .sid = 0x0000F027,
+        .sid = 0x0000F026,
         .non_secure_client = true,
         .minor_version = 1,
         .minor_policy = TFM_VERSION_POLICY_STRICT
@@ -180,7 +171,7 @@
         .name = "SPM_CORE_TEST_PERIPHERAL_ACCESS",
         .partition_id = TFM_SP_CORE_TEST_ID,
         .signal = SPM_CORE_TEST_PERIPHERAL_ACCESS_SIGNAL,
-        .sid = 0x0000F028,
+        .sid = 0x0000F027,
         .non_secure_client = true,
         .minor_version = 1,
         .minor_policy = TFM_VERSION_POLICY_STRICT
@@ -189,7 +180,7 @@
         .name = "SPM_CORE_TEST_GET_CALLER_CLIENT_ID",
         .partition_id = TFM_SP_CORE_TEST_ID,
         .signal = SPM_CORE_TEST_GET_CALLER_CLIENT_ID_SIGNAL,
-        .sid = 0x0000F029,
+        .sid = 0x0000F028,
         .non_secure_client = true,
         .minor_version = 1,
         .minor_policy = TFM_VERSION_POLICY_STRICT
@@ -198,7 +189,7 @@
         .name = "SPM_CORE_TEST_SPM_REQUEST",
         .partition_id = TFM_SP_CORE_TEST_ID,
         .signal = SPM_CORE_TEST_SPM_REQUEST_SIGNAL,
-        .sid = 0x0000F02A,
+        .sid = 0x0000F029,
         .non_secure_client = true,
         .minor_version = 1,
         .minor_policy = TFM_VERSION_POLICY_STRICT
@@ -207,7 +198,7 @@
         .name = "SPM_CORE_TEST_BLOCK",
         .partition_id = TFM_SP_CORE_TEST_ID,
         .signal = SPM_CORE_TEST_BLOCK_SIGNAL,
-        .sid = 0x0000F02B,
+        .sid = 0x0000F02A,
         .non_secure_client = true,
         .minor_version = 1,
         .minor_policy = TFM_VERSION_POLICY_STRICT
@@ -216,7 +207,7 @@
         .name = "SPM_CORE_TEST_NS_THREAD",
         .partition_id = TFM_SP_CORE_TEST_ID,
         .signal = SPM_CORE_TEST_NS_THREAD_SIGNAL,
-        .sid = 0x0000F02C,
+        .sid = 0x0000F02B,
         .non_secure_client = true,
         .minor_version = 1,
         .minor_policy = TFM_VERSION_POLICY_STRICT
@@ -560,13 +551,6 @@
         .msg_queue = {0},
         .list = {0},
     },
-    {
-        .service_db = NULL,
-        .partition = NULL,
-        .handle_list = {0},
-        .msg_queue = {0},
-        .list = {0},
-    },
 #endif /* TFM_PARTITION_TEST_CORE */
 
 #ifdef TFM_PARTITION_TEST_CORE
diff --git a/test/suites/core/non_secure/core_ns_positive_testsuite.c b/test/suites/core/non_secure/core_ns_positive_testsuite.c
index 26bac10..80c115c 100644
--- a/test/suites/core/non_secure/core_ns_positive_testsuite.c
+++ b/test/suites/core/non_secure/core_ns_positive_testsuite.c
@@ -33,7 +33,6 @@
 #ifndef TFM_PSA_API
 static void tfm_core_test_permissions(struct test_result_t *ret);
 static void tfm_core_test_mpu_access(struct test_result_t *ret);
-static void tfm_core_test_share_change(struct test_result_t *ret);
 static void tfm_core_test_get_caller_client_id(struct test_result_t *ret);
 static void tfm_core_test_spm_request(struct test_result_t *ret);
 #endif /* TFM_PSA_API */
@@ -80,11 +79,6 @@
     "Test secure service buffer accesses"),
 CORE_TEST_DESCRIPTION(CORE_TEST_ID_SS_TO_SS, tfm_core_test_ss_to_ss,
     "Test secure service to service call"),
-#ifndef TFM_PSA_API
-CORE_TEST_DESCRIPTION(CORE_TEST_ID_SHARE_REDIRECTION,
-    tfm_core_test_share_change,
-    "Test secure service share change request"),
-#endif /* TFM_PSA_API */
 CORE_TEST_DESCRIPTION(CORE_TEST_ID_SS_TO_SS_BUFFER,
     tfm_core_test_ss_to_ss_buffer,
     "Test secure service to service call with buffer handling"),
@@ -799,25 +793,6 @@
     ret->val = TEST_PASSED;
 }
 
-#ifndef TFM_PSA_API
-static void tfm_core_test_share_change(struct test_result_t *ret)
-{
-    int32_t err;
-    int32_t test_case_id = CORE_TEST_ID_SHARE_REDIRECTION;
-    psa_invec in_vec[] = { {&test_case_id, sizeof(int32_t)} };
-    struct tfm_core_test_call_args_t args = {in_vec, 1, NULL, 0};
-
-    err = tfm_core_test_call(tfm_spm_core_test_sfn_veneer, &args);
-
-    if (err != CORE_TEST_ERRNO_SUCCESS) {
-        TEST_FAIL("Failed to redirect share region in service.");
-        return;
-    }
-
-    ret->val = TEST_PASSED;
-}
-#endif /* TFM_PSA_API */
-
 static void tfm_core_test_ss_to_ss_buffer(struct test_result_t *ret)
 {
     int32_t res, i;
diff --git a/test/test_services/tfm_core_test/core_test_defs.h b/test/test_services/tfm_core_test/core_test_defs.h
index f7600d9..e2b26c5 100644
--- a/test/test_services/tfm_core_test/core_test_defs.h
+++ b/test/test_services/tfm_core_test/core_test_defs.h
@@ -25,7 +25,6 @@
 #define CORE_TEST_ID_MPU_ACCESS           1006
 #define CORE_TEST_ID_BUFFER_CHECK         1007
 #define CORE_TEST_ID_SS_TO_SS             1008
-#define CORE_TEST_ID_SHARE_REDIRECTION    1009
 #define CORE_TEST_ID_SS_TO_SS_BUFFER      1010
 #define CORE_TEST_ID_PERIPHERAL_ACCESS    1012
 #define CORE_TEST_ID_GET_CALLER_CLIENT_ID 1013
diff --git a/test/test_services/tfm_core_test/psa_manifest/tfm_test_core.h b/test/test_services/tfm_core_test/psa_manifest/tfm_test_core.h
index e6ab73b..38204ed 100644
--- a/test/test_services/tfm_core_test/psa_manifest/tfm_test_core.h
+++ b/test/test_services/tfm_core_test/psa_manifest/tfm_test_core.h
@@ -19,15 +19,14 @@
 #define SPM_CORE_TEST_DIRECT_RECURSION_SIGNAL                   (1U << ( 1 + 4))
 #define SPM_CORE_TEST_MPU_ACCESS_SIGNAL                         (1U << ( 2 + 4))
 #define SPM_CORE_TEST_MEMORY_PERMISSIONS_SIGNAL                 (1U << ( 3 + 4))
-#define SPM_CORE_TEST_SHARE_REDIRECTION_SIGNAL                  (1U << ( 4 + 4))
-#define SPM_CORE_TEST_SS_TO_SS_SIGNAL                           (1U << ( 5 + 4))
-#define SPM_CORE_TEST_SS_TO_SS_BUFFER_SIGNAL                    (1U << ( 6 + 4))
-#define SPM_CORE_TEST_OUTVEC_WRITE_SIGNAL                       (1U << ( 7 + 4))
-#define SPM_CORE_TEST_PERIPHERAL_ACCESS_SIGNAL                  (1U << ( 8 + 4))
-#define SPM_CORE_TEST_GET_CALLER_CLIENT_ID_SIGNAL               (1U << ( 9 + 4))
-#define SPM_CORE_TEST_SPM_REQUEST_SIGNAL                        (1U << (10 + 4))
-#define SPM_CORE_TEST_BLOCK_SIGNAL                              (1U << (11 + 4))
-#define SPM_CORE_TEST_NS_THREAD_SIGNAL                          (1U << (12 + 4))
+#define SPM_CORE_TEST_SS_TO_SS_SIGNAL                           (1U << ( 4 + 4))
+#define SPM_CORE_TEST_SS_TO_SS_BUFFER_SIGNAL                    (1U << ( 5 + 4))
+#define SPM_CORE_TEST_OUTVEC_WRITE_SIGNAL                       (1U << ( 6 + 4))
+#define SPM_CORE_TEST_PERIPHERAL_ACCESS_SIGNAL                  (1U << ( 7 + 4))
+#define SPM_CORE_TEST_GET_CALLER_CLIENT_ID_SIGNAL               (1U << ( 8 + 4))
+#define SPM_CORE_TEST_SPM_REQUEST_SIGNAL                        (1U << ( 9 + 4))
+#define SPM_CORE_TEST_BLOCK_SIGNAL                              (1U << (10 + 4))
+#define SPM_CORE_TEST_NS_THREAD_SIGNAL                          (1U << (11 + 4))
 
 #endif /* TFM_PARTITION_TEST_CORE */
 #ifdef __cplusplus
diff --git a/test/test_services/tfm_core_test/tfm_ss_core_test.c b/test/test_services/tfm_core_test/tfm_ss_core_test.c
index 3340437..b7bcedd 100644
--- a/test/test_services/tfm_core_test/tfm_ss_core_test.c
+++ b/test/test_services/tfm_core_test/tfm_ss_core_test.c
@@ -203,11 +203,6 @@
 }
 #endif /* !defined(TFM_PSA_API) */
 
-static psa_status_t test_share_redirection(void)
-{
-    return CORE_TEST_ERRNO_SUCCESS;
-}
-
 static psa_status_t test_peripheral_access(void)
 {
 #ifdef TFM_ENABLE_PERIPH_ACCESS_TEST
@@ -528,8 +523,6 @@
         arg3 = (int32_t)out_vec[0].base;
         return test_memory_permissions(
             (uint32_t *)arg1, (uint32_t *)arg2, (uint32_t *)arg3);
-    case CORE_TEST_ID_SHARE_REDIRECTION:
-        return test_share_redirection();
     case CORE_TEST_ID_SS_TO_SS:
         return test_ss_to_ss();
     case CORE_TEST_ID_SS_TO_SS_BUFFER:
@@ -589,11 +582,6 @@
     return CORE_TEST_ERRNO_TEST_NOT_SUPPORTED;
 }
 
-static psa_status_t tfm_core_test_sfn_wrap_share_redirection(psa_msg_t *msg)
-{
-    return test_share_redirection();
-}
-
 static psa_status_t tfm_core_test_sfn_wrap_ss_to_ss(psa_msg_t *msg)
 {
     return test_ss_to_ss();
@@ -717,9 +705,6 @@
         } else if (signals & SPM_CORE_TEST_MEMORY_PERMISSIONS_SIGNAL) {
             core_test_signal_handle(SPM_CORE_TEST_MEMORY_PERMISSIONS_SIGNAL,
                                     tfm_core_test_sfn_wrap_memory_permissions);
-        } else if (signals & SPM_CORE_TEST_SHARE_REDIRECTION_SIGNAL) {
-            core_test_signal_handle(SPM_CORE_TEST_SHARE_REDIRECTION_SIGNAL,
-                                    tfm_core_test_sfn_wrap_share_redirection);
         } else if (signals & SPM_CORE_TEST_SS_TO_SS_SIGNAL) {
             core_test_signal_handle(SPM_CORE_TEST_SS_TO_SS_SIGNAL,
                                     tfm_core_test_sfn_wrap_ss_to_ss);
diff --git a/test/test_services/tfm_core_test/tfm_test_core.yaml b/test/test_services/tfm_core_test/tfm_test_core.yaml
index 8bbe7eb..2bed651 100644
--- a/test/test_services/tfm_core_test/tfm_test_core.yaml
+++ b/test/test_services/tfm_core_test/tfm_test_core.yaml
@@ -81,16 +81,8 @@
       "minor_policy": "STRICT"
     },
     {
-      "name": "SPM_CORE_TEST_SHARE_REDIRECTION",
-      "sid": "0x0000F024",
-      "signal": "SPM_CORE_TEST_SHARE_REDIRECTION_SIGNAL",
-      "non_secure_clients": true,
-      "minor_version": 1,
-      "minor_policy": "STRICT"
-    },
-    {
       "name": "SPM_CORE_TEST_SS_TO_SS",
-      "sid": "0x0000F025",
+      "sid": "0x0000F024",
       "signal": "SPM_CORE_TEST_SS_TO_SS_SIGNAL",
       "non_secure_clients": true,
       "minor_version": 1,
@@ -98,7 +90,7 @@
     },
     {
       "name": "SPM_CORE_TEST_SS_TO_SS_BUFFER",
-      "sid": "0x0000F026",
+      "sid": "0x0000F025",
       "signal": "SPM_CORE_TEST_SS_TO_SS_BUFFER_SIGNAL",
       "non_secure_clients": true,
       "minor_version": 1,
@@ -106,7 +98,7 @@
     },
     {
       "name": "SPM_CORE_TEST_OUTVEC_WRITE",
-      "sid": "0x0000F027",
+      "sid": "0x0000F026",
       "signal": "SPM_CORE_TEST_OUTVEC_WRITE_SIGNAL",
       "non_secure_clients": true,
       "minor_version": 1,
@@ -114,7 +106,7 @@
     },
     {
       "name": "SPM_CORE_TEST_PERIPHERAL_ACCESS",
-      "sid": "0x0000F028",
+      "sid": "0x0000F027",
       "signal": "SPM_CORE_TEST_PERIPHERAL_ACCESS_SIGNAL",
       "non_secure_clients": true,
       "minor_version": 1,
@@ -122,7 +114,7 @@
     },
     {
       "name": "SPM_CORE_TEST_GET_CALLER_CLIENT_ID",
-      "sid": "0x0000F029",
+      "sid": "0x0000F028",
       "signal": "SPM_CORE_TEST_GET_CALLER_CLIENT_ID_SIGNAL",
       "non_secure_clients": true,
       "minor_version": 1,
@@ -130,7 +122,7 @@
     },
     {
       "name": "SPM_CORE_TEST_SPM_REQUEST",
-      "sid": "0x0000F02A",
+      "sid": "0x0000F029",
       "signal": "SPM_CORE_TEST_SPM_REQUEST_SIGNAL",
       "non_secure_clients": true,
       "minor_version": 1,
@@ -138,7 +130,7 @@
     },
     {
       "name": "SPM_CORE_TEST_BLOCK",
-      "sid": "0x0000F02B",
+      "sid": "0x0000F02A",
       "signal": "SPM_CORE_TEST_BLOCK_SIGNAL",
       "non_secure_clients": true,
       "minor_version": 1,
@@ -146,7 +138,7 @@
     },
     {
       "name": "SPM_CORE_TEST_NS_THREAD",
-      "sid": "0x0000F02C",
+      "sid": "0x0000F02B",
       "signal": "SPM_CORE_TEST_NS_THREAD_SIGNAL",
       "non_secure_clients": true,
       "minor_version": 1,