regression 1018: out of bounds memref tests ensure TA is not reached

Change regression test 1018 to allow any layer if the TEE invocation
channel to report outbound memory reference as long as it is the the
TA itself since outbound memory reference should be caught before the
TA is invoked by the TEE.

This change makes xtest regression test 1018 more flexible towards
changes in the OP-TEE components that can catch invalid memory reference
in invocation parameters depending on the OP-TEE configuration.

Fixes: 84382b31d3a3 ("regression 1018: add 1byte out of bounds reference test sub cases")
Reported-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/host/xtest/regression_1000.c b/host/xtest/regression_1000.c
index 6aafa4b..17e15b2 100644
--- a/host/xtest/regression_1000.c
+++ b/host/xtest/regression_1000.c
@@ -1388,7 +1388,7 @@
 	ret = TEEC_InvokeCommand(session, TA_OS_TEST_CMD_PARAMS,
 				 &op, &ret_orig);
 
-	ADBG_EXPECT(c, TEEC_ORIGIN_COMMS, ret_orig);
+	ADBG_EXPECT_COMPARE_UNSIGNED(c, ret_orig, !=, TEEC_ORIGIN_TRUSTED_APP);
 	if (ret != TEEC_ERROR_BAD_PARAMETERS && ret != TEEC_ERROR_GENERIC) {
 		ADBG_EXPECT(c, TEEC_ERROR_BAD_PARAMETERS, ret);
 		ADBG_EXPECT(c, TEEC_ERROR_GENERIC, ret);
@@ -1451,7 +1451,7 @@
 	ret = TEEC_InvokeCommand(&session, TA_OS_TEST_CMD_PARAMS, &op,
 				 &ret_orig);
 
-	ADBG_EXPECT(c, TEEC_ORIGIN_COMMS, ret_orig);
+	ADBG_EXPECT_COMPARE_UNSIGNED(c, ret_orig, !=, TEEC_ORIGIN_TRUSTED_APP);
 	if (ret != TEEC_ERROR_BAD_PARAMETERS && ret != TEEC_ERROR_GENERIC) {
 		ADBG_EXPECT(c, TEEC_ERROR_BAD_PARAMETERS, ret);
 		ADBG_EXPECT(c, TEEC_ERROR_GENERIC, ret);