Catch up with Gearman's libtest
authorBrian Aker <brian@tangent.org>
Sun, 13 May 2012 02:05:10 +0000 (22:05 -0400)
committerBrian Aker <brian@tangent.org>
Sun, 13 May 2012 02:05:10 +0000 (22:05 -0400)
35 files changed:
example/t/memcached_light.cc
libtest/collection.cc
libtest/fatal.cc
libtest/framework.cc
libtest/framework.h
libtest/include.am
libtest/port.cc
libtest/port.h
libtest/server.cc
libtest/skiptest.cc
libtest/stream.h
libtest/unittest.cc
tests/cycle.cc
tests/failure.cc
tests/hash_plus.cc
tests/hashkit_functions.cc
tests/libmemcached-1.0/all_tests.cc
tests/libmemcached-1.0/all_tests_socket.cc
tests/libmemcached-1.0/atomsmasher.cc
tests/libmemcached-1.0/internals.cc
tests/libmemcached-1.0/plus.cpp
tests/libmemcached-1.0/sasl.cc
tests/mem_udp.cc
tests/memcapable.cc
tests/memcat.cc
tests/memcp.cc
tests/memdump.cc
tests/memerror.cc
tests/memexist.cc
tests/memflush.cc
tests/memrm.cc
tests/memslap.cc
tests/memstat.cc
tests/memtouch.cc
tests/parser.cc

index e24d31c2350cdd47b6018eaf709aa5d0d869f780..b9c4e5fb5782f7e427a2e43cb9907cb1986c9927 100644 (file)
@@ -233,9 +233,9 @@ static bool world_destroy(void *object)
 
 void get_world(Framework *world)
 {
-  world->_create= world_create;
-  world->_destroy= world_destroy;
-  world->collections= collection;
+  world->create(world_create);
+  world->destroy(world_destroy);
+  world->collections(collection);
   world->set_runner(new MemcachedLightRunner);
 }
 
index c6fec1ebd8d57250700aa29a30d6e8dc70f17d90..5814c2f4a1546cd2fe72ea5a13d0f6628387e4d6 100644 (file)
@@ -97,8 +97,6 @@ test_return_t Collection::exec()
   {
     for (test_st *run= _tests; run->name; run++)
     {
-      long int load_time= 0;
-
       if (_frame->match(run->name))
       {
         continue;
@@ -123,7 +121,6 @@ test_return_t Collection::exec()
       catch (libtest::fatal &e)
       {
         Error << "Fatal exception was thrown: " << e.what();
-        return_code= TEST_FAILURE;
         _failed++;
         throw;
       }
index 9ab3292f3c0a4bec0d0ac14440e0972204e9d7e4..a43559206e431d7bb0adcdd27ecc5cde3e819539 100644 (file)
@@ -42,8 +42,8 @@ namespace libtest {
 
 fatal::fatal(const char *file_arg, int line_arg, const char *func_arg, const char *format, ...) :
   std::runtime_error(func_arg),
-  _file(file_arg),
   _line(line_arg),
+  _file(file_arg),
   _func(func_arg)
   {
     va_list args;
index eb0f4120de3982eacdc485d3a5e487f37a7461bf..ea7ca66505e79af9811da02b3701f854c772f151 100644 (file)
@@ -48,13 +48,14 @@ using namespace libtest;
 Framework::Framework(libtest::SignalThread& signal,
                      const std::string& only_run_arg,
                      const std::string& wildcard_arg) :
-  collections(NULL),
+  _collections(NULL),
   _total(0),
   _success(0),
   _skipped(0),
   _failed(0),
   _create(NULL),
   _destroy(NULL),
+  _on_error(NULL),
   _runner(NULL),
   _socket(false),
   _creators_ptr(NULL),
@@ -64,7 +65,7 @@ Framework::Framework(libtest::SignalThread& signal,
 {
   get_world(this);
 
-  for (collection_st *next= collections; next and next->name; next++)
+  for (collection_st *next= _collections; next and next->name; next++)
   {
     _collection.push_back(new Collection(this, next));
   }
@@ -87,7 +88,6 @@ Framework::~Framework()
   {
     delete *iter;
   }
-  _collection.clear();
 }
 
 bool Framework::match(const char* arg)
index 45cd6533c1f78fb413617aab8c62cbf69221b655..da1d5b9878ed2b28a4ac5451a10050778fe8b440 100644 (file)
 
 class Framework {
 public:
-  collection_st *collections;
-
-  /* These methods are called outside of any collection call. */
-  test_callback_create_fn *_create;
-  test_callback_destroy_fn *_destroy;
 
 public:
   test_return_t create();
 
-  /**
-    If an error occurs during the test, this is called.
-  */
-  test_callback_error_fn *_on_error;
+  void create(test_callback_create_fn* arg)
+  {
+    _create= arg;
+  }
+
+  void destroy(test_callback_destroy_fn* arg)
+  {
+    _destroy= arg;
+  }
+
+  void collections(collection_st* arg)
+  {
+    _collections= arg;
+  }
 
   void set_on_error(test_callback_error_fn *arg)
   {
@@ -83,12 +88,6 @@ public:
   {
     return _servers;
   }
-  
-  /**
-    Runner represents the callers for the tests. If not implemented we will use
-    a set of default implementations.
-  */
-  libtest::Runner *_runner;
 
   void set_runner(libtest::Runner *arg)
   {
@@ -154,10 +153,27 @@ public:
 private:
   Framework& operator=(const Framework&);
 
+  collection_st *_collections;
+
   uint32_t _total;
   uint32_t _success;
   uint32_t _skipped;
   uint32_t _failed;
+  
+  /* These methods are called outside of any collection call. */
+  test_callback_create_fn *_create;
+  test_callback_destroy_fn *_destroy;
+
+  /**
+    If an error occurs during the test, this is called.
+  */
+  test_callback_error_fn *_on_error;
+
+  /**
+    Runner represents the callers for the tests. If not implemented we will use
+    a set of default implementations.
+  */
+  libtest::Runner *_runner;
 
   libtest::server_startup_st _servers;
   bool _socket;
index a0d5aa040433df53672dfa09521dfd2c89ee3e8c..9c7fe2448e2948a9a07964a93041fc6242a87e6d 100644 (file)
@@ -32,57 +32,56 @@ drd:
 
 EXTRA_DIST+= libtest/run.gdb
 
-CLEANFILES+= \
-            tmp_chroot/var/drizzle/* \
-            tmp_chroot/var/log/* \
-            tmp_chroot/var/run/* \
-            tmp_chroot/var/tmp/*
+CLEANFILES+= tmp_chroot/etc/*
+CLEANFILES+= tmp_chroot/var/drizzle/*
+CLEANFILES+= tmp_chroot/var/log/*
+CLEANFILES+= tmp_chroot/var/run/*
+CLEANFILES+= tmp_chroot/var/tmp/*
 
 .PHONY: distclean-libtest-check
 distclean-libtest-check:
        -rm -rf tmp_chroot
 
 noinst_HEADERS+= libtest/timer.hpp
-noinst_HEADERS+= \
-                libtest/binaries.h \
-                libtest/cpu.hpp \
-                libtest/blobslap_worker.h \
-                libtest/callbacks.h \
-                libtest/cmdline.h \
-                libtest/collection.h \
-                libtest/common.h \
-                libtest/comparison.hpp \
-                libtest/core.h \
-                libtest/dream.h \
-                libtest/error.h \
-                libtest/failed.h \
-                libtest/fatal.hpp \
-                libtest/framework.h \
-                libtest/gearmand.h \
-                libtest/drizzled.h \
-                libtest/get.h \
-                libtest/has.hpp \
-                libtest/http.hpp \
-                libtest/is_pid.hpp \
-                libtest/is_local.hpp \
-                libtest/killpid.h \
-                libtest/libtool.hpp \
-                libtest/memcached.h \
-                libtest/port.h \
-                libtest/runner.h \
-                libtest/server.h \
-                libtest/server_container.h \
-                libtest/signal.h \
-                libtest/socket.hpp \
-                libtest/stream.h \
-                libtest/strerror.h \
-                libtest/string.hpp \
-                libtest/test.h \
-                libtest/test.hpp \
-                libtest/tmpfile.hpp \
-                libtest/vchar.hpp \
-                libtest/visibility.h \
-                libtest/wait.h
+noinst_HEADERS+=libtest/binaries.h 
+noinst_HEADERS+=libtest/cpu.hpp 
+noinst_HEADERS+=libtest/blobslap_worker.h 
+noinst_HEADERS+=libtest/callbacks.h 
+noinst_HEADERS+=libtest/cmdline.h 
+noinst_HEADERS+=libtest/collection.h 
+noinst_HEADERS+=libtest/common.h 
+noinst_HEADERS+=libtest/comparison.hpp 
+noinst_HEADERS+=libtest/core.h 
+noinst_HEADERS+=libtest/dream.h 
+noinst_HEADERS+=libtest/error.h 
+noinst_HEADERS+=libtest/failed.h 
+noinst_HEADERS+=libtest/fatal.hpp 
+noinst_HEADERS+=libtest/framework.h 
+noinst_HEADERS+=libtest/gearmand.h 
+noinst_HEADERS+=libtest/drizzled.h 
+noinst_HEADERS+=libtest/get.h 
+noinst_HEADERS+=libtest/has.hpp 
+noinst_HEADERS+=libtest/http.hpp 
+noinst_HEADERS+=libtest/is_pid.hpp 
+noinst_HEADERS+=libtest/is_local.hpp 
+noinst_HEADERS+=libtest/killpid.h 
+noinst_HEADERS+=libtest/libtool.hpp 
+noinst_HEADERS+=libtest/memcached.h 
+noinst_HEADERS+=libtest/port.h 
+noinst_HEADERS+=libtest/runner.h 
+noinst_HEADERS+=libtest/server.h 
+noinst_HEADERS+=libtest/server_container.h 
+noinst_HEADERS+=libtest/signal.h 
+noinst_HEADERS+=libtest/socket.hpp 
+noinst_HEADERS+=libtest/stream.h 
+noinst_HEADERS+=libtest/strerror.h 
+noinst_HEADERS+=libtest/string.hpp 
+noinst_HEADERS+=libtest/test.h 
+noinst_HEADERS+=libtest/test.hpp 
+noinst_HEADERS+=libtest/tmpfile.hpp 
+noinst_HEADERS+=libtest/vchar.hpp 
+noinst_HEADERS+=libtest/visibility.h 
+noinst_HEADERS+=libtest/wait.h
 
 noinst_LTLIBRARIES+= libtest/libtest.la
 
@@ -113,6 +112,7 @@ libtest_libtest_la_SOURCES+= libtest/server.cc
 libtest_libtest_la_SOURCES+= libtest/server_container.cc 
 libtest_libtest_la_SOURCES+= libtest/signal.cc 
 libtest_libtest_la_SOURCES+= libtest/socket.cc 
+libtest_libtest_la_SOURCES+= libtest/stream.cc 
 libtest_libtest_la_SOURCES+= libtest/strerror.cc 
 libtest_libtest_la_SOURCES+= libtest/timer.cc 
 libtest_libtest_la_SOURCES+= libtest/tmpfile.cc 
@@ -190,9 +190,12 @@ endif
 
 libtest_tmp_dir: tmp_chroot/var/log tmp_chroot/var/tmp tmp_chroot/var/run tmp_chroot/var/drizzle
 
-tmp_chroot:
+tmp_chroot: tmp_chroot/etc
        @$(mkdir_p) tmp_chroot
 
+tmp_chroot/etc:
+       @$(mkdir_p) tmp_chroot/etc
+
 tmp_chroot/var: tmp_chroot
        @$(mkdir_p) tmp_chroot/var
 
index 9f9a5bfeede83d9053a1504b2f44cc70bc5e1ab5..904a0addc5733d3ea4f8715057aa1befa8f0292a 100644 (file)
@@ -50,6 +50,9 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
+#include <utility>
+#include <vector>
+
 #include <signal.h>
 
 #include <libtest/signal.h>
 using namespace libtest;
 
 struct socket_st {
-  std::vector<int> fd;
+  typedef std::vector< std::pair< int, in_port_t> > socket_port_t;
+  socket_port_t _pair;
+
+  void release(in_port_t _arg)
+  {
+    for(socket_port_t::iterator iter= _pair.begin();
+        iter != _pair.end();
+        iter++)
+    {
+      if ((*iter).second == _arg)
+      {
+        close((*iter).first);
+      }
+    }
+  }
 
   ~socket_st()
   {
-    for(std::vector<int>::iterator iter= fd.begin(); iter != fd.end(); iter++)
+    for(socket_port_t::iterator iter= _pair.begin();
+        iter != _pair.end();
+        iter++)
     {
-      close(*iter);
+      close((*iter).first);
     }
   }
 };
@@ -88,6 +107,11 @@ in_port_t default_port()
   return global_port;
 }
 
+void release_port(in_port_t arg)
+{
+  all_socket_fd.release(arg);
+}
+
 in_port_t get_free_port()
 {
   in_port_t ret_port= in_port_t(0);
@@ -119,7 +143,7 @@ in_port_t get_free_port()
         }
       }
 
-      all_socket_fd.fd.push_back(sd);
+      all_socket_fd._pair.push_back(std::make_pair(sd, ret_port));
     }
 
     if (ret_port > 1024)
index 3d593136771706dfde6ccd52b68c5956db28d97d..bded6abcd18dca29fb39bbd98823492a18533834 100644 (file)
@@ -48,4 +48,7 @@ in_port_t default_port();
 LIBTEST_API
 in_port_t get_free_port();
 
+LIBTEST_API
+void release_port(in_port_t arg);
+
 } // namespace libtest
index 31c58094fa86e10bbbb3cc418491bb7c54783a4c..78b729f96cb473faeeef973e325865cb0a28689f 100644 (file)
@@ -192,6 +192,7 @@ bool Server::start()
     return false;
   }
 
+  libtest::release_port(_port);
   Application::error_t ret;
   if (Application::SUCCESS !=  (ret= _app.run()))
   {
index ac0437192fa2d5a33f112482907c46bac532ba36..354e2db134723eea9d9f79a1cf3b1fb29ea1ab97 100644 (file)
@@ -53,5 +53,5 @@ static void *world_create(server_startup_st&, test_return_t& rc)
 
 void get_world(Framework *world)
 {
-  world->_create= world_create;
+  world->create(world_create);
 }
index a32362f28977110fd25ba49e679547f03a6039a1..5d86be3e0e4cc95a2c0873d109387f1776034288 100644 (file)
@@ -153,6 +153,7 @@ public:
   make_cerr(const char* filename, int line_number, const char* func) :
     detail::log<detail::channelln>(std::cerr, filename, line_number, func)
   { }
+
 };
 
 class cerr : public detail::log<detail::channel> {
@@ -160,6 +161,7 @@ public:
   cerr(const char* filename, int line_number, const char* func) :
     detail::log<detail::channel>(std::cout, filename, line_number, func)
   { }
+
 };
 
 class clog : public detail::log<detail::channel> {
index 234743f53907a8cb1d897067116b6fc15b31d064..c27f366a8b5670ce56a081fb421ab56b15063d2b 100644 (file)
@@ -953,6 +953,6 @@ static void *world_create(server_startup_st& servers, test_return_t&)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
index 788d7e67bf88bd7ac8eb9d09d89cbc1aa776a8c7..fe4ca1b37016180dc860924f7f37bd2dea28ee74 100644 (file)
@@ -123,7 +123,7 @@ static void *world_create(server_startup_st& servers, test_return_t& )
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index d31518ee137d8f2151bda7ece605451ea4a43c5c..445de246bccb38534b730ab9258df1bae3f223ef 100644 (file)
@@ -213,10 +213,10 @@ void get_world(Framework *world)
 {
   world->servers().set_servers_to_run(1);
 
-  world->collections= collection;
+  world->collections(collection);
 
-  world->_create= (test_callback_create_fn*)world_create;
-  world->_destroy= (test_callback_destroy_fn*)world_destroy;
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
 
   world->set_runner(new LibmemcachedRunner);
 
index 778ec220c4cb30bfecebc323abdf0a843b2e641d..9cb4b384e777e68ea011a495925798751c40f281 100644 (file)
@@ -215,5 +215,5 @@ collection_st collection[] ={
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
+  world->collections(collection);
 }
index e13a854b794435c881d92d7ee26876ad983403cb..4934b55b45c018aba451b8a37058624172ee0fd0 100644 (file)
@@ -564,7 +564,7 @@ static bool world_destroy(void *object)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
-  world->_destroy= world_destroy;
+  world->collections(collection);
+  world->create(world_create);
+  world->destroy(world_destroy);
 }
index e5a6d2bf279477f821f6ab3ad9e1104c0b4da6a3..4d4d4ca8be20b1a40f1720df354b0d4547fbd2d0 100644 (file)
@@ -82,10 +82,10 @@ void get_world(Framework *world)
     world->servers().set_servers_to_run(8);
   }
 
-  world->collections= collection;
+  world->collections(collection);
 
-  world->_create= (test_callback_create_fn*)world_create;
-  world->_destroy= (test_callback_destroy_fn*)world_destroy;
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
 
   world->set_runner(new LibmemcachedRunner);
 
index cdc7b211703c73cd1b3cb69339be9831838b34c9..958873fb9f3fd7cd4e78e9de6bd6d019904376f4 100644 (file)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
+  world->collections(collection);
 
-  world->_create= (test_callback_create_fn*)world_create;
-  world->_destroy= (test_callback_destroy_fn*)world_destroy;
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
 
   world->set_runner(new LibmemcachedRunner);
 }
index 45171c8b12ec0a719a6966c0662fb18ef254455b..e5d53b60ea76079026aa300385d3ecac8471e658 100644 (file)
@@ -275,10 +275,10 @@ collection_st collection[] ={
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
+  world->collections(collection);
 
-  world->_create= (test_callback_create_fn*)world_create;
-  world->_destroy= (test_callback_destroy_fn*)world_destroy;
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
 
   world->set_runner(new LibmemcachedRunner);
 }
index 8c28d3156c1526cf09e34a57d3f6e4e1ef5abcad..6e0232fc3a3d0eb72fdb439e34fb6b466cf848b1 100644 (file)
@@ -63,5 +63,5 @@ collection_st collection[] ={
 
 void get_world(Framework *frame)
 {
-  frame->collections= collection;
+  frame->collections(collection);
 }
index 8539c5e6dc9fe79c1f3f5d7f1f4d0f004198b8d5..a01544c5c10fd63a87e7ecdbd8f01bedf6208b81 100644 (file)
@@ -286,10 +286,10 @@ collection_st collection[] ={
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
+  world->collections(collection);
 
-  world->_create= world_create;
-  world->_destroy= world_destroy;
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
 
   world->set_runner(new LibmemcachedRunner);
 }
index 1c3d4a9947e3238c623c10494fa466ba7214c339..0ae101f2925f4855b574dad9c04386a5e1c18895 100644 (file)
@@ -101,10 +101,10 @@ collection_st collection[] ={
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
+  world->collections(collection);
 
-  world->_create= (test_callback_create_fn*)world_create;
-  world->_destroy= (test_callback_destroy_fn*)world_destroy;
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
 
   world->set_runner(new LibmemcachedRunner);
 
index 4a567962ff3399da7616aacce2bb1fe9d58905ef..1bc4096aafca0f32bd95cbe8a6c122c653da5f76 100644 (file)
@@ -566,10 +566,10 @@ collection_st collection[] ={
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
+  world->collections(collection);
 
-  world->_create= (test_callback_create_fn*)world_create;
-  world->_destroy= (test_callback_destroy_fn*)world_destroy;
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
 
   world->set_runner(new LibmemcachedRunner);
 }
index ae50fefaf95c212d972146c06943d51f31bc6225..d0392d016afd69900c2c0ffaedc4c112c119a7b4 100644 (file)
@@ -125,7 +125,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 void get_world(Framework *world)
 {
   executable= "./clients/memcapable";
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index e51cdce1451e235e944b626a97cc269cd9d8dc0e..32e3f2c3c7cfe45777057e799e8305bb34a2256d 100644 (file)
@@ -143,7 +143,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index eab8cfa58a7d946d9b0d9c229404300a89e0cbed..8aba60883cc5d66f39b38b46a3739491aa2a58a5 100644 (file)
@@ -102,7 +102,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index 4a30892138cbf7f3dade30185672ccedffeb7918..a8720e5b272c2fc520285c99dfd51cf910519f0b 100644 (file)
@@ -129,7 +129,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index 914d2a03b4df6ced19d0196503023c68579e161f..dd7610ef625cb9be3a23cbb47742fa959f21535d 100644 (file)
@@ -119,7 +119,7 @@ static void *world_create(server_startup_st&, test_return_t&)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index 29ad50912ce64983599a94d63aa6d82b7fba6309..fb69354dac4975694db3182940c1042804425130 100644 (file)
@@ -160,7 +160,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index f14b5b727d884f6171d44b89920fd8f4b0cf6abc..80a42453068e8fb35092b97c55f41fd1488c4d16 100644 (file)
@@ -113,7 +113,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 void get_world(Framework *world)
 {
   executable= "./clients/memflush";
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index 8d6109c0ac679084e66662df942d57ce4bd20929..29c663376a33f63d2e6102a4c770bc018874d707 100644 (file)
@@ -163,7 +163,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index 6f990af498d9c81d7bfa79c5c9e878e334c482f2..3c5ea25030e2e36af734b6022f0f9a3e077ae4f8 100644 (file)
@@ -186,7 +186,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 void get_world(Framework *world)
 {
   executable= "./clients/memslap";
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index ae8679fb13d47bc30fd8f63336e9b7cdd8ede2ee..9b61697dda6ab45b500763a3b0c898c99c6ef46d 100644 (file)
@@ -124,7 +124,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index fa65e8b413ff85c25437eb5efbc249cda6435fe2..c44e6a08dcca5ac67d06eb34ccc8032b6cd097e5 100644 (file)
@@ -157,7 +157,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 void get_world(Framework *world)
 {
   executable= "./clients/memtouch";
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }
 
index 740a9c19ade36f91e29143b67064aeeee3766747..7078305336ea3f1c267b96e5a590606231e729f4 100644 (file)
@@ -126,6 +126,6 @@ collection_st collection[] ={
 
 void get_world(Framework *world)
 {
-  world->collections= collection;
+  world->collections(collection);
 }