Skip to content

Commit

Permalink
Merge changes from 3.15 branch into 7.0
Browse files Browse the repository at this point in the history
- merged 3.15 branch up to bf7a160

# Conflicts:
#	modules/database/src/ioc/db/dbChannel.c
  • Loading branch information
ralphlange committed Jul 15, 2020
2 parents 5c03f8b + bf7a160 commit 7d2e352
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 16 deletions.
4 changes: 2 additions & 2 deletions configure/RULES_BUILD
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 12 additions & 4 deletions documentation/RELEASE_NOTES.md
Expand Up @@ -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 `<testname>.xml` to `<testname>-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
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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/<host>/dbdToHtml.pl -H`
or `perldoc bin/<host>/dbdToHtml.pl`.
these instructions, run `perl bin/<host>/dbdToHtml.pl -H`
or `perldoc bin/<host>/dbdToHtml.pl`.

### Fix problem with numeric soft events

Expand Down
2 changes: 1 addition & 1 deletion modules/ca/src/client/access.cpp
Expand Up @@ -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 : "<null>", lineno );
if ( pFormat ) {
vfprintf ( stderr, pFormat, theArgs );
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ca/src/tools/cainfo.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion modules/ca/src/tools/camonitor.c
Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions modules/ca/src/tools/caput.c
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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;
Expand Down Expand Up @@ -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 */
Expand All @@ -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;
}

Expand All @@ -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;
}
4 changes: 4 additions & 0 deletions modules/database/src/ioc/db/dbChannel.c
Expand Up @@ -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;

/*
Expand Down
4 changes: 2 additions & 2 deletions modules/database/src/ioc/db/recGbl.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions modules/libcom/src/flex/misc.c
Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 );
}
Expand Down
2 changes: 1 addition & 1 deletion modules/libcom/src/osi/os/default/osdNetIntf.c
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions modules/libcom/src/osi/os/default/osdThreadHooks.c
Expand Up @@ -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;
}

Expand Down
5 changes: 3 additions & 2 deletions modules/libcom/src/osi/os/vxWorks/osdThread.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7d2e352

Please sign in to comment.