Make mailbox clearing idempotent.

Change-Id: Ib07df13119eee7b4d916688bdb68a0760aedccaa
diff --git a/test/vmapi/primary_with_secondaries/mailbox.c b/test/vmapi/primary_with_secondaries/mailbox.c
index c54cdb4..bd5b588 100644
--- a/test/vmapi/primary_with_secondaries/mailbox.c
+++ b/test/vmapi/primary_with_secondaries/mailbox.c
@@ -61,6 +61,16 @@
 }
 
 /**
+ * Clearing an empty mailbox is a noop.
+ */
+TEST(mailbox, clear_empty)
+{
+	EXPECT_EQ(hf_mailbox_clear(), 0);
+	EXPECT_EQ(hf_mailbox_clear(), 0);
+	EXPECT_EQ(hf_mailbox_clear(), 0);
+}
+
+/**
  * Send and receive the same message from the echo VM.
  */
 TEST(mailbox, echo)