Merge "libdbus-p2p: add a dual forked test" into tizen
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Wed, 2 Feb 2022 16:02:20 +0000 (16:02 +0000)
committerGerrit Code Review <gerrit@review>
Wed, 2 Feb 2022 16:02:20 +0000 (16:02 +0000)
1  2 
benchmark/libdbus-p2p-client.cpp
benchmark/libdbus-p2p-server.cpp

index 612b8839e6003aef59cd3d86d6d95336395e1e73,12a7b76fe997cbf9c9282672ccc95aee3bedb598..6b3d434e991480997dc67717c897d4523ea8d651
@@@ -70,17 -63,14 +70,17 @@@ struct client_run_opts 
        std::string sock_path = "/tmp/test";
  };
  
- run_opts get_opt (int argc, char ** argv)
static client_run_opts get_opt (int argc, char ** argv)
  {
-       run_opts ret;
+       client_run_opts ret;
  
        int opt;
 -      while ((opt = getopt(argc, argv, "d:m:t:p:h")) != -1)
 +      while ((opt = getopt(argc, argv, "c:d:m:t:p:h")) != -1)
        switch (opt) {
  
 +      case 'c':
 +              ret.cpu_pin = std::stoi(optarg);
 +              break;
        case 'm':
                ret.payload = std::stoi(optarg);
                break;
index 5b083a6b0eb6f3c0673dd2d8b1a1519a5f72fa31,86628d7d917dcd88b18fa5d9f0072307183cd446..6c23433576fe6e8c7da08d1a50cbe04fc485af02
@@@ -79,17 -73,14 +79,17 @@@ struct server_run_opts 
        std::optional <std::string> raw_data_path = std::nullopt;
  };
  
- run_opts get_opt (int argc, char ** argv)
static server_run_opts get_opt (int argc, char ** argv)
  {
-       run_opts ret;
+       server_run_opts ret;
  
        int opt;
 -      while ((opt = getopt(argc, argv, ":ihp:r:t:w")) != -1)
 +      while ((opt = getopt(argc, argv, ":c:ihp:r:t:w")) != -1)
        switch (opt) {
  
 +      case 'c':
 +              ret.cpu_pin = std::stoi(optarg);
 +              break;
        case 'i':
                ret.infinite_listening = true;
                break;