]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Analysis workflow, make debug output.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jun 2021 07:43:02 +0000 (09:43 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jun 2021 07:43:02 +0000 (09:43 +0200)
.github/workflows/analysis_ports.yml
compat/ctime_r.c
testcode/replay.c

index 1a66b200fe364f41dcbbcdc4552058387afe8855..5b39c7c28e5863c384107fd70d72f86bf2188abb 100644 (file)
@@ -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
index 87c2609a840876aff0e2cda11205c39fd0b9b7c0..b6bc12208a23aacf28271b6e507e77a22a84f97c 100644 (file)
@@ -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;
 }
index 1cdb9d3f6f21ded3444e79baa2c611fd69aec9e8..1077a6d08d8e50d7d15a8feff1e00c6bc427f7b8 100644 (file)
@@ -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");