[Trusty] skip port fail test on second run
Change-Id: I17860ad0ce5841aa7adadba3cd84f30204d9085f
Test: com.android.trusty.apploader.test
Bug: 300225616
diff --git a/app-mgmt-test/client/main.c b/app-mgmt-test/client/main.c
index d2627fb..dbe8f6f 100644
--- a/app-mgmt-test/client/main.c
+++ b/app-mgmt-test/client/main.c
@@ -391,7 +391,8 @@
*/
static bool skip = false;
if (skip) {
- trusty_unittest_printf("[ SKIPPED ]\n");
+ trusty_unittest_printf(
+ "[ SKIPPED ] Can't run second time without unloading.\n");
return;
}
skip = true;
@@ -576,6 +577,18 @@
/* Regular ports should not start an app on connection */
TEST(AppMgrPortStartFail, PortStartFail) {
+ /*
+ * TODO: If no unloading, on the second run port is already in 'cancelled'
+ * state, so running the test second time makes no sense, just skip it.
+ */
+ static bool skip = false;
+ if (skip) {
+ trusty_unittest_printf(
+ "[ SKIPPED ] Can't run second time without unloading.\n");
+ return;
+ }
+ skip = true;
+
int rc;
handle_t chan = INVALID_IPC_HANDLE;
uevent_t uevt;