diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index cb02f8317..174823010 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -116,7 +116,7 @@ ifneq (,$(filter $(T_A), $(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS))) RUNTESTS_ENABLED = YES TESTSCRIPTS.t = $(filter %.t, $(TESTSCRIPTS)) TAPFILES.t += $(TESTSCRIPTS.t:.t=.tap) -JUNITFILES.t += $(TESTSCRIPTS.t:.t=.xml) +JUNITFILES.t += $(TESTSCRIPTS.t:.t=-results.xml) TAPFILES += $(TAPFILES.t) JUNITFILES += $(JUNITFILES.t) endif @@ -390,7 +390,7 @@ ifdef RUNTESTS_ENABLED $(PERL) $< -tap > $@ endif -$(JUNITFILES.t): %.xml: %.tap +$(JUNITFILES.t): %-results.xml: %.tap $(TAPTOJUNIT) --puretap --output $@ --input $< $* # If there's a perl test script (.plt) available, use it diff --git a/documentation/RELEASE_NOTES.md b/documentation/RELEASE_NOTES.md index 6fd80615a..e78bb6438 100644 --- a/documentation/RELEASE_NOTES.md +++ b/documentation/RELEASE_NOTES.md @@ -1329,6 +1329,15 @@ header and removed the need for dbScan.c to reach into the internals of its # Changes incorporated from the 3.15 branch +## Changes made on the 3.15 branch since 3.15.8 + +### Change to the `junitfiles` self-test build target + +The names of the generated junit xml test output files have been changed +from `.xml` to `-results.xml`, to allow better +distinction from other xml files. (I.e., for easy wildcard matching.) + + ## Changes made between 3.15.7 and 3.15.8 ### Bug fixes @@ -1352,7 +1361,6 @@ The following launchpad bugs have fixes included in this release: - [lp: 1868486](https://bugs.launchpad.net/epics-base/+bug/1868486), epicsMessageQueue lost messages - ### Improvements to the self-test build targets This release contains changes that make it possible to integrate another test @@ -1368,7 +1376,7 @@ results; previously the `-k` flag to make was needed and even that didn't always work. Continuous Integration systems are recommended to run `make tapfiles` (or if -they can read junittest output instead of TAP `make junitests`) followed by +they can read junittest output instead of TAP `make junitfiles`) followed by `make -s test-results` to display the results of the tests. If multiple CPUs are available the `-j` flag can be used to run tests in parallel, giving the maximum jobs that should be allowed so `make -j4 tapfiles` for a system with 4 CPUs say. @@ -1616,8 +1624,8 @@ cases. This fixes Some documentation has been added to the `dbdToHtml.pl` script explaining how Perl POD (Plain Old Documentation) markup can be added to `.dbd` files to generate HTML documentation for the record types. To see -these instructions, run `perl bin//dbdToHtml.pl -H` -or `perldoc bin//dbdToHtml.pl`. +these instructions, run `perl bin//dbdToHtml.pl -H` +or `perldoc bin//dbdToHtml.pl`. ### Fix problem with numeric soft events diff --git a/modules/ca/src/client/access.cpp b/modules/ca/src/client/access.cpp index 169a08bef..4e4669eec 100644 --- a/modules/ca/src/client/access.cpp +++ b/modules/ca/src/client/access.cpp @@ -603,7 +603,7 @@ void epicsStdCall ca_signal_formated ( long ca_status, const char *pfilenm, } else { fprintf ( stderr, "CA exception in thread w/o CA ctx: status=%s file=%s line=%d: \n", - ca_message ( ca_status ), pfilenm, lineno ); + ca_message ( ca_status ), pfilenm ? pfilenm : "", lineno ); if ( pFormat ) { vfprintf ( stderr, pFormat, theArgs ); } diff --git a/modules/ca/src/tools/cainfo.c b/modules/ca/src/tools/cainfo.c index 13696de34..d65204e14 100644 --- a/modules/ca/src/tools/cainfo.c +++ b/modules/ca/src/tools/cainfo.c @@ -157,7 +157,7 @@ int main (int argc, char *argv[]) } break; case 's': /* ca_client_status interest level */ - if (sscanf(optarg,"%du", &statLevel) != 1) + if (sscanf(optarg,"%u", &statLevel) != 1) { fprintf(stderr, "'%s' is not a valid interest level " "- ignored. ('cainfo -h' for help.)\n", optarg); diff --git a/modules/ca/src/tools/camonitor.c b/modules/ca/src/tools/camonitor.c index e83883702..682a9c53a 100644 --- a/modules/ca/src/tools/camonitor.c +++ b/modules/ca/src/tools/camonitor.c @@ -258,7 +258,7 @@ int main (int argc, char *argv[]) } break; case '#': /* Array count */ - if (sscanf(optarg,"%ld", &reqElems) != 1) + if (sscanf(optarg,"%lu", &reqElems) != 1) { fprintf(stderr, "'%s' is not a valid array element count " "- ignored. ('camonitor -h' for help.)\n", optarg); diff --git a/modules/ca/src/tools/caput.c b/modules/ca/src/tools/caput.c index 0cd923e72..c44bd22cb 100644 --- a/modules/ca/src/tools/caput.c +++ b/modules/ca/src/tools/caput.c @@ -437,6 +437,7 @@ int main (int argc, char *argv[]) dbuf = calloc (count, sizeof(double)); if(!sbuf || !dbuf) { fprintf(stderr, "Memory allocation failed\n"); + free(sbuf); free(dbuf); return 1; } @@ -450,6 +451,7 @@ int main (int argc, char *argv[]) result = ca_pend_io(caTimeout); if (result == ECA_TIMEOUT) { fprintf(stderr, "Read operation timed out: ENUM data was not read.\n"); + free(sbuf); free(dbuf); return 1; } @@ -460,6 +462,7 @@ int main (int argc, char *argv[]) if (*(argv+optind+i) == pend) { /* Conversion didn't work */ fprintf(stderr, "Enum index value '%s' is not a number.\n", *(argv+optind+i)); + free(sbuf); free(dbuf); return 1; } if (dbuf[i] >= bufGrEnum.no_str) { @@ -486,6 +489,7 @@ int main (int argc, char *argv[]) dbuf[i] = epicsStrtod(sbuf[i], &pend); if (sbuf[i] == pend || enumAsString) { fprintf(stderr, "Enum string value '%s' invalid.\n", sbuf[i]); + free(sbuf); free(dbuf); return 1; } if (dbuf[i] >= bufGrEnum.no_str) { @@ -503,6 +507,7 @@ int main (int argc, char *argv[]) ebuf = calloc(len, sizeof(char)); if(!ebuf) { fprintf(stderr, "Memory allocation failed\n"); + free(sbuf); free(dbuf); free(ebuf); return 1; } count = epicsStrnRawFromEscaped(ebuf, len, cbuf, len-1) + 1; @@ -537,12 +542,14 @@ int main (int argc, char *argv[]) } if (result != ECA_NORMAL) { fprintf(stderr, "Error from put operation: %s\n", ca_message(result)); + free(sbuf); free(dbuf); free(ebuf); return 1; } result = ca_pend_io(caTimeout); if (result == ECA_TIMEOUT) { fprintf(stderr, "Write operation timed out: Data was not written.\n"); + free(sbuf); free(dbuf); free(ebuf); return 1; } if (request == callback) { /* Also wait for callbacks */ @@ -556,6 +563,7 @@ int main (int argc, char *argv[]) if (result != ECA_NORMAL) { fprintf(stderr, "Error occured writing data: %s\n", ca_message(result)); + free(sbuf); free(dbuf); free(ebuf); return 1; } @@ -567,6 +575,7 @@ int main (int argc, char *argv[]) /* Shut down Channel Access */ ca_context_destroy(); + free(sbuf); free(dbuf); free(ebuf); return result; } diff --git a/modules/database/src/ioc/db/dbChannel.c b/modules/database/src/ioc/db/dbChannel.c index bc3c8e421..ad03ffdf3 100644 --- a/modules/database/src/ioc/db/dbChannel.c +++ b/modules/database/src/ioc/db/dbChannel.c @@ -603,6 +603,10 @@ long dbChannelOpen(dbChannel *chan) probe.no_elements = dbChannelElements(chan); probe.field_size = dbChannelFieldSize(chan); probe.sevr = NO_ALARM; + probe.stat = NO_ALARM; + probe.time.secPastEpoch = 0; + probe.time.nsec = 0; + p = probe; /* diff --git a/modules/database/src/ioc/db/recGbl.c b/modules/database/src/ioc/db/recGbl.c index 93ac8aa6f..c54dfe515 100644 --- a/modules/database/src/ioc/db/recGbl.c +++ b/modules/database/src/ioc/db/recGbl.c @@ -69,7 +69,7 @@ void recGblDbaddrError(long status, const struct dbAddr *paddr, errPrintf(status,0,0, "PV: %s.%s " "error detected in routine: %s\n", - (paddr ? precord->name : "Unknown"), + (precord ? precord->name : "Unknown"), (pdbFldDes ? pdbFldDes->name : ""), (pmessage ? pmessage : "Unknown")); return; @@ -106,7 +106,7 @@ void recGblRecSupError(long status, const struct dbAddr *paddr, " %s\n", (psupport_name ? psupport_name : "Unknown"), (pdbRecordType ? pdbRecordType->name : "Unknown"), - (paddr ? precord->name : "Unknown"), + (precord ? precord->name : "Unknown"), (pdbFldDes ? pdbFldDes->name : ""), (pmessage ? pmessage : "")); return; diff --git a/modules/libcom/src/flex/misc.c b/modules/libcom/src/flex/misc.c index ffcc6de9a..a594d1663 100644 --- a/modules/libcom/src/flex/misc.c +++ b/modules/libcom/src/flex/misc.c @@ -438,7 +438,7 @@ int htoi(unsigned char *str) { int result; - (void) sscanf( (char *) str, "%x", &result ); + (void) sscanf( (char *) str, "%x", (unsigned *) &result ); return ( result ); } @@ -653,7 +653,7 @@ int otoi(Char *str) { int result; - (void) sscanf( (char *) str, "%o", &result ); + (void) sscanf( (char *) str, "%o", (unsigned *) &result ); return ( result ); } diff --git a/modules/libcom/src/osi/os/default/osdNetIntf.c b/modules/libcom/src/osi/os/default/osdNetIntf.c index 25bc64db7..105908577 100644 --- a/modules/libcom/src/osi/os/default/osdNetIntf.c +++ b/modules/libcom/src/osi/os/default/osdNetIntf.c @@ -211,7 +211,7 @@ LIBCOM_API void epicsStdCall osiSockDiscoverBroadcastAddresses pNewNode->addr.sa = pIfreqList->ifr_broadaddr; ifDepenDebugPrintf ( ( "found broadcast addr = %x\n", ntohl ( baddr.ia.sin_addr.s_addr ) ) ); } else { - ifDepenDebugPrintf ( ( "Ignoring broadcast addr = \n", ntohl ( baddr.ia.sin_addr.s_addr ) ) ); + ifDepenDebugPrintf ( ( "Ignoring broadcast addr = %x\n", ntohl ( baddr.ia.sin_addr.s_addr ) ) ); free ( pNewNode ); continue; } diff --git a/modules/libcom/src/osi/os/default/osdThreadHooks.c b/modules/libcom/src/osi/os/default/osdThreadHooks.c index 924c1a20e..23f39beb6 100644 --- a/modules/libcom/src/osi/os/default/osdThreadHooks.c +++ b/modules/libcom/src/osi/os/default/osdThreadHooks.c @@ -71,6 +71,7 @@ LIBCOM_API int epicsThreadHookAdd(EPICS_THREAD_HOOK_ROUTINE hook) return 0; } fprintf(stderr, "epicsThreadHookAdd: Locking problem\n"); + free(pHook); return -1; } diff --git a/modules/libcom/src/osi/os/vxWorks/osdThread.c b/modules/libcom/src/osi/os/vxWorks/osdThread.c index f97b2d840..424f87246 100644 --- a/modules/libcom/src/osi/os/vxWorks/osdThread.c +++ b/modules/libcom/src/osi/os/vxWorks/osdThread.c @@ -468,8 +468,9 @@ LIBCOM_API void epicsThreadMap ( EPICS_THREAD_HOOK_ROUTINE func ) while (noTasks == 0) { noTasks = taskIdListGet(taskIdList, taskIdListSize); if (noTasks == taskIdListSize) { - taskIdList = realloc(taskIdList, (taskIdListSize+ID_LIST_CHUNK)*sizeof(int)); - assert(taskIdList); + int *newlist = realloc(taskIdList, (taskIdListSize+ID_LIST_CHUNK)*sizeof(int)); + assert(newlist); + taskIdList = newlist; taskIdListSize += ID_LIST_CHUNK; noTasks = 0; }