diff --git a/host/xtest/regression_1000.c b/host/xtest/regression_1000.c index c550d9dbe..54f89bf0e 100644 --- a/host/xtest/regression_1000.c +++ b/host/xtest/regression_1000.c @@ -3305,11 +3305,15 @@ static void *test_1040_thread(void *arg) &err_orig); TEEC_CloseSession(&session); if (res != TEEC_ERROR_TARGET_DEAD) { - a->res = res; + if (res) + a->res = res; + else + a->res = TEEC_ERROR_GENERIC; return NULL; } n++; } + a->res = TEEC_SUCCESS; return NULL; } @@ -3323,7 +3327,7 @@ static void xtest_tee_test_1040(ADBG_Case_t *c) for (n = 0; n < nt; n++) { if (!ADBG_EXPECT(c, 0, pthread_create(&arg[n].thr, NULL, test_1040_thread, - arg + n))) + arg + n))) nt = n; /* break loop and start cleanup */ } for (n = 0; n < nt; n++) { @@ -3335,4 +3339,3 @@ static void xtest_tee_test_1040(ADBG_Case_t *c) } ADBG_CASE_DEFINE(regression, 1040, xtest_tee_test_1040, "Test panic in concurrent open/invoke/close session"); -