diff options
| author | Doug Gilbert <dgilbert@us.ibm.com> | 2012-05-23 15:07:32 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-06-07 12:24:23 -0500 |
| commit | b3167b05a764bfcf9cd1db862d4f95715f54ec67 (patch) | |
| tree | a94c3de832b19ff8a7196ea024e1cbb8046fed5e /src/usr/mbox/test | |
| parent | a3c942122c4c96305238a83eced1ca468b0677a0 (diff) | |
| download | blackbird-hostboot-b3167b05a764bfcf9cd1db862d4f95715f54ec67.tar.gz blackbird-hostboot-b3167b05a764bfcf9cd1db862d4f95715f54ec67.zip | |
HB Mailbox queue messages until destination service is ready.
RTC: 42424
Change-Id: If56ecd8cda845badaf7a8757e2f74eb7d0514398
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1098
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/mbox/test')
| -rw-r--r-- | src/usr/mbox/test/mboxsptest.H | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/usr/mbox/test/mboxsptest.H b/src/usr/mbox/test/mboxsptest.H index ad6865d2e..ff43bd5b1 100644 --- a/src/usr/mbox/test/mboxsptest.H +++ b/src/usr/mbox/test/mboxsptest.H @@ -36,6 +36,7 @@ #include <limits.h> #include <mbox/mboxif.H> #include <targeting/common/util.H> +#include <sys/time.h> extern trace_desc_t* g_trac_mbox; @@ -57,17 +58,12 @@ class MboxSPTest : public CxxTest::TestSuite { return; } + + errlHndl_t err = NULL; // requires proper simics model // msg will get echoed which looks like a new msg from FSP // Register a message queue to receive it. msg_q_t msgQ = msg_q_create(); - errlHndl_t err = MBOX::msgq_register(MBOX::HB_TEST_MSGQ,msgQ); - - if(err) - { - TS_FAIL("MBOX: Could not register message queue"); - errlCommit(err,HBMBOX_COMP_ID); - } // Send some messages - DMA size will force a request // to be sent to FSP for more buffers. @@ -88,6 +84,18 @@ class MboxSPTest : public CxxTest::TestSuite } } + nanosleep(0,1000000); + + // late registration to test ability to queue message until + // a queue is ready + err = MBOX::msgq_register(MBOX::HB_TEST_MSGQ,msgQ); + if(err) + { + TS_FAIL("MBOX: Could not register message queue"); + errlCommit(err,HBMBOX_COMP_ID); + } + + // Send last message msg_t * msg = msg_allocate(); msg->type = 0xff; // use this to terminate while loop below |

