Tests should release the RX buffer when they are done.

Add a TEAR_DOWN to all test suites which use the RX buffer to check
that it has been released by the time each test finishes.

Bug: 146208457
Change-Id: Ic3b14fe7acee4ceaeef948dade39d87f6b2e0861
diff --git a/test/vmapi/primary_with_secondaries/mailbox.c b/test/vmapi/primary_with_secondaries/mailbox.c
index 8e2e67c..b96c595 100644
--- a/test/vmapi/primary_with_secondaries/mailbox.c
+++ b/test/vmapi/primary_with_secondaries/mailbox.c
@@ -63,6 +63,11 @@
 	}
 }
 
+TEAR_DOWN(mailbox)
+{
+	EXPECT_SPCI_ERROR(spci_rx_release(), SPCI_DENIED);
+}
+
 /**
  * Clearing an empty mailbox is an error.
  */
@@ -307,6 +312,7 @@
 	EXPECT_EQ(run_res.func, SPCI_MSG_SEND_32);
 	EXPECT_EQ(spci_msg_send_size(run_res), sizeof(message));
 	EXPECT_EQ(memcmp(mb.recv, message, sizeof(message)), 0);
+	EXPECT_EQ(spci_rx_release().func, SPCI_SUCCESS_32);
 }
 
 /**
@@ -341,6 +347,7 @@
 	EXPECT_EQ(run_res.func, SPCI_MSG_SEND_32);
 	EXPECT_EQ(spci_msg_send_size(run_res), sizeof(message));
 	EXPECT_EQ(memcmp(mb.recv, message, sizeof(message)), 0);
+	EXPECT_EQ(spci_rx_release().func, SPCI_SUCCESS_32);
 
 	/* Run VM again so that it clears its mailbox. */
 	run_res = spci_run(SERVICE_VM1, 0);