From 51a8ef6e7ff521687cc59287dd6c8b396c020f95 Mon Sep 17 00:00:00 2001
From: "S. ElSayed" <s.elsayed@fz-juelich.de>
Date: Sun, 14 Nov 2021 19:22:58 +0100
Subject: [PATCH] Finished both D3.3 and D3.4 input

---
 io_container/io_container.cpp        | 2 +-
 io_container/io_container_daemon.cpp | 2 +-
 obj_container/obj_container.cpp      | 2 +-
 unittests/io_cont_conf.json          | 2 +-
 unittests/mio_config.yaml            | 8 ++++----
 unittests/producer.py                | 3 ++-
 6 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/io_container/io_container.cpp b/io_container/io_container.cpp
index 3a5e649..dab343f 100644
--- a/io_container/io_container.cpp
+++ b/io_container/io_container.cpp
@@ -86,7 +86,7 @@ int exec_elem::execute() {
         //char** opt_arr = opt_vec.data();
         execvp(exec_name.c_str(), opt_vec);
 
-        spdlog::error("Failed to start with execv {}", errno);
+        spdlog::error("Failed to start with execvp {}", errno);
         exit(EXIT_FAILURE);
     } else {
         /* this is the parent */
diff --git a/io_container/io_container_daemon.cpp b/io_container/io_container_daemon.cpp
index aee44d7..9655b57 100644
--- a/io_container/io_container_daemon.cpp
+++ b/io_container/io_container_daemon.cpp
@@ -35,7 +35,7 @@ int parse_args(int argc, char**argv, std::string * config_path){
         }
     }
     if (config_path->length() == 0){
-        fprintf(stderr, "No config file given");
+        fprintf(stderr, "No config file given\n");
         usage(argv);
         return 1;
     }
diff --git a/obj_container/obj_container.cpp b/obj_container/obj_container.cpp
index e764f69..e51cad8 100644
--- a/obj_container/obj_container.cpp
+++ b/obj_container/obj_container.cpp
@@ -347,7 +347,7 @@ int obj_container::del_kv_pairs(std::vector<std::string> kp_keys,
  * - FIFO uses eol_key to place upcoming keys and ignore write_idx.
  * However other sorting types might require a distinction between last
  * element in list and the last written index. Meanwhile LIFO ignores both.
- * - FIFO doesn't allow for insertion once read_idx starts to advance.
+ * - LIFO doesn't allow for insertion once read_idx starts to advance.
  *   There are 2 possible solutions to this:
  *      1. Overwrite: Add objects where the read_idx has moved to overwriting
  *         already read objects
diff --git a/unittests/io_cont_conf.json b/unittests/io_cont_conf.json
index 9717423..68f9de6 100644
--- a/unittests/io_cont_conf.json
+++ b/unittests/io_cont_conf.json
@@ -3,7 +3,7 @@
 	"consumer" : {
         "type" : "app",
         "exec_name" : "python",
-        "options" : ["consumer.py", "-a", "tcp://0.0.0.0:5555", "-o", "100", "-r", "10"],
+        "options" : ["consumer.py", "-a", "tcp://0.0.0.0:5555", "-o", "10", "-r", "2"],
         "pre_exec" : "Notimplemented",
         "post_exec" : "Notimplemented"
 	},
diff --git a/unittests/mio_config.yaml b/unittests/mio_config.yaml
index f11ddc7..c226a9d 100644
--- a/unittests/mio_config.yaml
+++ b/unittests/mio_config.yaml
@@ -1,4 +1,4 @@
-# elsayed1 visnode-02
+# elsayed1 visnode-03
 # MIO configuration Yaml file. 
 # MIO_Config_Sections: [MIO_CONFIG, MOTR_CONFIG]
 MIO_CONFIG:
@@ -9,10 +9,10 @@ MIO_CONFIG:
   
 MOTR_CONFIG:
   MOTR_USER_GROUP: motr 
-  MOTR_INST_ADDR: 172.18.1.38@o2ib:12345:4:2
-  MOTR_HA_ADDR: 172.18.1.38@o2ib:12345:1:1
+  MOTR_INST_ADDR: 172.18.1.39@o2ib:12345:4:1
+  MOTR_HA_ADDR: 172.18.1.39@o2ib:12345:1:1
   MOTR_PROFILE: <0x7000000000000001:0x2e2>
-  MOTR_PROCESS_FID: <0x7200000000000001:0x1c4>
+  MOTR_PROCESS_FID: <0x7200000000000001:0x1d2>
   MOTR_DEFAULT_UNIT_SIZE: 1048576
   MOTR_IS_OOSTORE: 1
   MOTR_IS_READ_VERIFY: 0
diff --git a/unittests/producer.py b/unittests/producer.py
index 5f15865..9e1a5d5 100644
--- a/unittests/producer.py
+++ b/unittests/producer.py
@@ -3,6 +3,7 @@ import sys
 sys.path.append("../client_api")
 import obj_service_api as objserv
 import logging
+import math
 
 logging.basicConfig(filename='producer.log', level=logging.DEBUG)
 
@@ -34,7 +35,7 @@ if serv.contcreat("FIFO") == -1 :
     serv.fini()
     exit()
 
-splitedSize = args["puts"]
+splitedSize = math.ceil(args["objects"]/args["puts"])
 splited_obj_list_str = [obj_list_str[x:x+splitedSize] for x in range(0, len(obj_list_str), splitedSize)]
 
 # serv_addobjs
-- 
GitLab