diff options
author | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-05-19 11:47:38 +0200 |
---|---|---|
committer | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-05-19 11:47:38 +0200 |
commit | fe675c20c45ec5f6a15fc1b48533d8d9cb5b4975 (patch) | |
tree | d1e38a026fcf7cc91d535f2df42f986d011aaf24 | |
parent | e2786117b45472fdb653877014fbd4f4cc936050 (diff) | |
download | embedlog-fe675c20c45ec5f6a15fc1b48533d8d9cb5b4975.tar.gz embedlog-fe675c20c45ec5f6a15fc1b48533d8d9cb5b4975.tar.bz2 embedlog-fe675c20c45ec5f6a15fc1b48533d8d9cb5b4975.zip |
tst/test-el-{pbinary,print}.c: add missing options to the mix
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r-- | tst/test-el-pbinary.c | 51 | ||||
-rw-r--r-- | tst/test-el-print.c | 40 |
2 files changed, 47 insertions, 44 deletions
diff --git a/tst/test-el-pbinary.c b/tst/test-el-pbinary.c index bde4c0b..ad53645 100644 --- a/tst/test-el-pbinary.c +++ b/tst/test-el-pbinary.c @@ -588,38 +588,41 @@ static void pbinary_mix_of_everything_check(void) static void pbinary_mix_of_everything(void) { int level; - int timestamp; + int ts; int printlevel; int finfo; + int funcinfo; int colors; int prefix; - int fract; + int ts_fract; int nl; - int tm; + int ts_tm; char tname[512]; /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ - for (fract = EL_TS_FRACT_OFF; fract != EL_TS_FRACT_ERROR; ++fract) - for (level = EL_FATAL; level <= EL_DBG; ++level) - for (timestamp = EL_TS_OFF; timestamp != EL_TS_ERROR; ++timestamp) - for (printlevel = 0; printlevel <= 1; ++printlevel) - for (finfo = 0; finfo <= 1; ++finfo) - for (colors = 0; colors <= 1; ++colors) - for (prefix = 0; prefix <= 1; ++prefix) - for (nl = 0; nl <= 1; ++nl) - for (tm = 0; tm <= EL_TS_TM_ERROR; ++tm) + for (level = 0; level <= EL_DBG; ++level) + for (colors = 0; colors <= 1; ++colors) + for (ts = 0; ts != EL_TS_ERROR; ++ts) + for (ts_tm = 0; ts_tm <= EL_TS_TM_ERROR; ++ts_tm) + for (ts_fract = 0; ts_fract != EL_TS_FRACT_ERROR; ++ts_fract) + for (printlevel = 0; printlevel <= 1; ++printlevel) + for (nl = 0; nl <= 1; ++nl) + for (finfo = 0; finfo <= 1; ++finfo) + for (funcinfo = 0; funcinfo <= 1; ++funcinfo) + for (prefix = 0; prefix <= 1; ++prefix) { test_prepare(); el_option(EL_LEVEL, level); - el_option(EL_TS, timestamp); + el_option(EL_COLORS, colors); + el_option(EL_TS, ts); + el_option(EL_TS_TM, ts_tm); + el_option(EL_TS_FRACT, ts_fract); el_option(EL_PRINT_LEVEL, printlevel); el_option(EL_PRINT_NL, nl); el_option(EL_FINFO, finfo); - el_option(EL_COLORS, colors); + el_option(EL_FUNCINFO, funcinfo); el_option(EL_PREFIX, prefix ? "prefix" : NULL); - el_option(EL_TS_FRACT, fract); - el_option(EL_TS_TM, tm); add_log(EL_FATAL, d1, 1); add_log(EL_ALERT, d1, 1); @@ -630,18 +633,14 @@ static void pbinary_mix_of_everything(void) add_log(EL_INFO, d1, 1); add_log(EL_DBG, d8, 8); - /* - * cleanup so embedlog closes test file, which will flush data into - * disk so pbinary_check() can read that data - */ + sprintf(tname, "pbinary_mix_of_everything: level: %d, colors: %d, " + "ts: %d, ts_tm: %d, ts_fract: %d, print_level: %d, " + "nl: %d, finfo: %d, funcinfo: %d, prefix: %d", + level, colors, ts, ts_tm, ts_fract, printlevel, nl, + finfo, funcinfo, prefix); - el_cleanup(); - 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); + el_flush(); mt_run_named(pbinary_mix_of_everything_check, tname); - test_cleanup(); } } diff --git a/tst/test-el-print.c b/tst/test-el-print.c index 0ae939f..32b0df3 100644 --- a/tst/test-el-print.c +++ b/tst/test-el-print.c @@ -873,36 +873,40 @@ static void print_mix_of_everything_check(void) static void print_mix_of_everything(void) { int level; - int timestamp; + int ts; int printlevel; int finfo; int funcinfo; int colors; int prefix; - int fract; + int ts_fract; int nl; + int ts_tm; char tname[512]; /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ - for (fract = EL_TS_FRACT_OFF; fract != EL_TS_FRACT_ERROR; ++fract) - for (timestamp = EL_TS_OFF; timestamp != EL_TS_ERROR; ++timestamp) - for (level = EL_FATAL; level <= EL_DBG; ++level) - for (printlevel = 0; printlevel <= 1; ++printlevel) - for (colors = 0; colors <= 1; ++colors) - for (prefix = 0; prefix <= 1; ++prefix) - for (finfo = 0; finfo <= 1; ++finfo) - for (funcinfo = 0; funcinfo <= 1; ++funcinfo) - for (nl = 0; nl <= 1; ++nl) + for (level = 0; level <= EL_DBG; ++level) + for (colors = 0; colors <= 1; ++colors) + for (ts = 0; ts != EL_TS_ERROR; ++ts) + for (ts_tm = 0; ts_tm <= EL_TS_TM_ERROR; ++ts_tm) + for (ts_fract = 0; ts_fract != EL_TS_FRACT_ERROR; ++ts_fract) + for (printlevel = 0; printlevel <= 1; ++printlevel) + for (nl = 0; nl <= 1; ++nl) + for (finfo = 0; finfo <= 1; ++finfo) + for (funcinfo = 0; funcinfo <= 1; ++funcinfo) + for (prefix = 0; prefix <= 1; ++prefix) { test_prepare(); el_option(EL_LEVEL, level); - el_option(EL_TS, timestamp); + el_option(EL_COLORS, colors); + el_option(EL_TS, ts); + el_option(EL_TS_TM, ts_tm); + el_option(EL_TS_FRACT, ts_fract); el_option(EL_PRINT_LEVEL, printlevel); el_option(EL_PRINT_NL, nl); el_option(EL_FINFO, finfo); el_option(EL_FUNCINFO, funcinfo); - el_option(EL_COLORS, colors); el_option(EL_PREFIX, prefix ? "prefix" : NULL); add_log(ELF, "fatal message"); @@ -914,11 +918,11 @@ static void print_mix_of_everything(void) add_log(ELI, "info message"); add_log(ELD, "debug message"); - sprintf(tname, "print_mix_of_everything: fract: %d, level: %d" - ", timestamp: %d, printlevel: %d, funcinfo: %d" - ", finfo: %d, colors: %d, prefix: %d, nl: %d", fract, - level, timestamp, printlevel, funcinfo ,finfo, colors, prefix, - nl); + sprintf(tname, "print_mix_of_everything: level: %d, colors: %d, " + "ts: %d, ts_tm: %d, ts_fract: %d, print_level: %d, " + "nl: %d, finfo: %d, funcinfo: %d, prefix: %d", + level, colors, ts, ts_tm, ts_fract, printlevel, nl, + finfo, funcinfo, prefix); mt_run_named(print_mix_of_everything_check, tname); test_cleanup(); |