commit | aa7db8ee86a04789649635c85b523764711109fa | [log] [tgz] |
---|---|---|
author | Andrew Scull <ascull@google.com> | Fri Feb 01 14:12:19 2019 +0000 |
committer | Andrew Scull <ascull@google.com> | Fri Feb 22 17:08:48 2019 +0000 |
tree | debe5def1616fef1b722b65a54029a4f9dbd3f1f | |
parent | bc82f2d643f3d6e2a7692efa38c92fa275196274 [diff] [blame] |
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)