enhance(API): Add multi-threaded call
[ric-plt/lib/rmr.git] / test / rmr_nng_test.c
index 1ebdb94..1a8df89 100644 (file)
@@ -8,7 +8,7 @@
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
 
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
 
-       http://www.apache.org/licenses/LICENSE-2.0
+          http://www.apache.org/licenses/LICENSE-2.0
 
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
 
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
@@ -51,6 +51,8 @@
 #include <stdint.h>
 #include <ctype.h>
 #include <sys/epoll.h>
 #include <stdint.h>
 #include <ctype.h>
 #include <sys/epoll.h>
+#include <pthread.h>
+#include <semaphore.h>
 
 #define DEBUG 1
 
 
 #define DEBUG 1
 
 #include "test_nng_em.c"                                                       // nng/nn emulation (before including things under test)
 
 
 #include "test_nng_em.c"                                                       // nng/nn emulation (before including things under test)
 
 
-#include "../src/common/include/rmr.h"                                 // things the users see
-#include "../src/common/include/rmr_symtab.h"
-#include "../src/common/include/rmr_agnostic.h"                        // transport agnostic header
-#include "../src/nng/include/rmr_nng_private.h"                        // transport specific
+#include "rmr.h"                                       // things the users see
+#include "rmr_symtab.h"
+#include "rmr_agnostic.h"                      // transport agnostic header
+#include "rmr_nng_private.h"                   // transport specific
 
 
-#include "../src/common/src/symtab.c"
-#include "../src/nng/src/rmr_nng.c"
+#include "symtab.c"
+#include "rmr_nng.c"
+#include "mbuf_api.c"
 
 static void gen_rt( uta_ctx_t* ctx );          // defined in sr_nng_static_test, but used by a few others (eliminate order requirement below)
 
 
 static void gen_rt( uta_ctx_t* ctx );          // defined in sr_nng_static_test, but used by a few others (eliminate order requirement below)
 
@@ -84,6 +87,7 @@ static void gen_rt( uta_ctx_t* ctx );         // defined in sr_nng_static_test, but use
 #include "sr_nng_static_test.c"
 #include "wormhole_static_test.c"
 #include "rmr_nng_api_static_test.c"
 #include "sr_nng_static_test.c"
 #include "wormhole_static_test.c"
 #include "rmr_nng_api_static_test.c"
+#include "mbuf_api_static_test.c"
 
 
 /*
 
 
 /*
@@ -120,6 +124,10 @@ int main() {
        errors += sr_nng_test();                                // test the send/receive static functions
        fprintf( stderr, "<INFO> error count: %d\n", errors );
 
        errors += sr_nng_test();                                // test the send/receive static functions
        fprintf( stderr, "<INFO> error count: %d\n", errors );
 
+       fprintf( stderr, "<INFO> starting mbuf api tests\n" );
+       errors +=  mbuf_api_test( );
+       fprintf( stderr, "<INFO> error count: %d\n", errors );
+
        if( errors == 0 ) {
                fprintf( stderr, "<PASS> all tests were OK\n" );
        } else {
        if( errors == 0 ) {
                fprintf( stderr, "<PASS> all tests were OK\n" );
        } else {