aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2019-05-18 22:32:34 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2019-05-18 22:32:34 +0200
commitd9a8d5e06c9a18cf4aa489a3429ebe94e0cac8da (patch)
tree235b57c141afb2c9d6b9f769a31ee23e0c5bd5b0
parent3df66a33e0646998f4d017145de72f6dac101929 (diff)
downloadembedlog-d9a8d5e06c9a18cf4aa489a3429ebe94e0cac8da.tar.gz
embedlog-d9a8d5e06c9a18cf4aa489a3429ebe94e0cac8da.tar.bz2
embedlog-d9a8d5e06c9a18cf4aa489a3429ebe94e0cac8da.zip
tst/test-el-pbinary.c: run each step in mix test as separate test
pbinary_mix_of_everything() takes a long time, and it looks like it hung. This patch changes all mt_fok() checks to mt_run() so, message for each check is printed. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r--tst/test-el-pbinary.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/tst/test-el-pbinary.c b/tst/test-el-pbinary.c
index f8ade36..bde4c0b 100644
--- a/tst/test-el-pbinary.c
+++ b/tst/test-el-pbinary.c
@@ -580,17 +580,23 @@ static void pbinary_different_clocks(void)
========================================================================== */
+static void pbinary_mix_of_everything_check(void)
+{
+ mt_fok(pbinary_check());
+}
+
static void pbinary_mix_of_everything(void)
{
- int level;
- int timestamp;
- int printlevel;
- int finfo;
- int colors;
- int prefix;
- int fract;
- int nl;
- int tm;
+ int level;
+ int timestamp;
+ int printlevel;
+ int finfo;
+ int colors;
+ int prefix;
+ int fract;
+ int nl;
+ int tm;
+ char tname[512];
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@@ -629,13 +635,12 @@ static void pbinary_mix_of_everything(void)
* disk so pbinary_check() can read that data
*/
-#if 0
- fprintf(stderr, "fract: %d, level: %d, timestamp: %d, printlevel: %d"
- ", finfo: %d, colors: %d, prefix: %d, nl: %d\n", fract, level,
- timestamp, printlevel, finfo, colors, prefix, nl);
-#endif
el_cleanup();
- mt_fok(pbinary_check());
+ sprintf(tname, "pbinary_mix_of_everything: fract: %d, level: %d"
+ ", timestamp: %d, printlevel: %d"
+ ", finfo: %d, colors: %d, prefix: %d, nl: %d, tm: %d", fract,
+ level, timestamp, printlevel, finfo, colors, prefix, nl, tm);
+ mt_run_named(pbinary_mix_of_everything_check, tname);
test_cleanup();
}
@@ -719,7 +724,7 @@ void el_pbinary_test_group(void)
{
#if ENABLE_BINARY_LOGS
mt_run(pbinary_different_clocks);
- mt_run(pbinary_mix_of_everything);
+ pbinary_mix_of_everything();
mt_prepare_test = &test_prepare;
mt_cleanup_test = &test_cleanup;