From 358bc0d8bd8a417b74b6bb52815a2391b98e232e Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Fri, 25 Jun 2021 09:43:02 +0200 Subject: [PATCH] Analysis workflow, make debug output. --- .github/workflows/analysis_ports.yml | 1 + compat/ctime_r.c | 4 +++- testcode/replay.c | 9 +++------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/analysis_ports.yml b/.github/workflows/analysis_ports.yml index 1a66b200f..5b39c7c28 100644 --- a/.github/workflows/analysis_ports.yml +++ b/.github/workflows/analysis_ports.yml @@ -233,6 +233,7 @@ jobs: ./configure --enable-debug --enable-static-exe --disable-flto "--with-ssl=$prepath/openssl" --with-libexpat="$prepath/expat" make # specific test output + if echo "i686-mingw64" | grep -i -e linux -e dragonfly >/dev/null; then echo yes; else echo no; fi make testbound.exe; ./testbound.exe -s # make testbound; ./testbound.exe -p testdata/acl.rpl -o -vvvv make testbound.exe; ./testbound.exe -p testdata/auth_nsec3_ent.rpl -o -vvvv diff --git a/compat/ctime_r.c b/compat/ctime_r.c index 87c2609a8..b6bc12208 100644 --- a/compat/ctime_r.c +++ b/compat/ctime_r.c @@ -33,10 +33,12 @@ char *ctime_r(const time_t *timep, char *buf) lock_basic_lock(&ctime_lock); result = ctime(timep); if(buf && result) { + printf("ctime_r called result '%s'\n", result); if(strlen(result) > 10 && result[7]==' ' && result[8]=='0') result[8]=' '; /* fix error in windows ctime */ strcpy(buf, result); + printf("ctime_r called fixresult '%s'\n", buf); } lock_basic_unlock(&ctime_lock); - return result; + return buf; } diff --git a/testcode/replay.c b/testcode/replay.c index 1cdb9d3f6..1077a6d08 100644 --- a/testcode/replay.c +++ b/testcode/replay.c @@ -318,8 +318,7 @@ replay_moment_read(char* remain, FILE* in, const char* name, mom->evt_type = repevt_autotrust_check; while(isspace((unsigned char)*remain)) remain++; - if(strlen(remain)>0 && remain[strlen(remain)-1]=='\n') - remain[strlen(remain)-1] = 0; + strip_end_white(remain); mom->autotrust_id = strdup(remain); if(!mom->autotrust_id) fatal_exit("out of memory"); read_file_content(in, &pstate->lineno, mom); @@ -327,8 +326,7 @@ replay_moment_read(char* remain, FILE* in, const char* name, mom->evt_type = repevt_tempfile_check; while(isspace((unsigned char)*remain)) remain++; - if(strlen(remain)>0 && remain[strlen(remain)-1]=='\n') - remain[strlen(remain)-1] = 0; + strip_end_white(remain); mom->autotrust_id = strdup(remain); if(!mom->autotrust_id) fatal_exit("out of memory"); read_file_content(in, &pstate->lineno, mom); @@ -359,8 +357,7 @@ replay_moment_read(char* remain, FILE* in, const char* name, m++; if(!extstrtoaddr(s, &mom->addr, &mom->addrlen)) fatal_exit("bad infra_rtt address %s", s); - if(strlen(m)>0 && m[strlen(m)-1]=='\n') - m[strlen(m)-1] = 0; + strip_end_white(m); mom->variable = strdup(remain); mom->string = strdup(m); if(!mom->string) fatal_exit("out of memory");