We expect the simulators to run with that log formating argument:
-log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n
-Then, tesh sorts string on the 20 first lines only, and is stable when
+Then, tesh sorts string on the 19 first chars only, and is stable when
line beginings are equal. This should ensure that:
(1) tesh is effective (no false positive, no false negative)
(2) scheduling points are separated from each other
This is of course very SimGrid oriented, breaking the generality of
tesh, but who cares, actually?
+
+If you want to change the length of the prefix used for the sort,
+simply specify it after the output sort directive, like this:
+
+! output sort 22
ENVIRONMENT
-----------
filepos, rctx->expected_return);
} else if (!strncmp(line, "output sort", strlen("output sort"))) {
+ sort_len = atoi(line + strlen("output sort"));
+ if (sort_len==0)
+ sort_len=SORT_LEN_DEFAULT;
rctx->output_sort = 1;
VERB1("[%s] (sort output of next command)", filepos);
DEBUG2("Compare strings '%s' and '%s'", s1, s2);
- int res = strncmp(s1, s2, 19);
+ int res = strncmp(s1, s2, sort_len);
if (res == 0)
return p1>p2;
return res;
/*** Options ***/
int timeout_value = 5; /* child timeout value */
+int sort_len = 19; /* length of the prefix to sort */
const char *testsuite_name;
static void handle_line(const char *filepos, char *line)
/*** Options ***/
int timeout_value; /* child timeout value */
+int sort_len; /* length of the prefix to sort */
+#define SORT_LEN_DEFAULT 19
rctx_t rctx;
const char *testsuite_name;