Merge remote-tracking branch 'origin/7.0' into rtems5

This commit is contained in:
Brendan Chandler
2021-03-25 18:41:15 -05:00
74 changed files with 1272 additions and 668 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ static void check(short dbr_type) {
memset(buf, 0, sizeof(buf)); \
(void) dbPutField(&offaddr, DBR_LONG, &off, 1); \
pfl = db_create_read_log(pch); \
testOk(pfl && pfl->type == dbfl_type_rec, "Valid pfl, type = rec"); \
testOk(pfl && pfl->type == dbfl_type_ref, "Valid pfl, type = ref"); \
testOk(!dbChannelGetField(pch, DBR_LONG, buf, NULL, &req, pfl), "Got Field value"); \
testOk(req == Size, "Got %ld elements (expected %d)", req, Size); \
if (!testOk(!memcmp(buf, Expected, sizeof(Expected)), "Data correct")) \
@@ -73,9 +73,9 @@ static int fl_equals_array(short type, const db_field_log *pfl1, void *p2) {
}
break;
case DBR_STRING:
if (strtol(&((const char*)pfl1->u.r.field)[i*MAX_STRING_SIZE], NULL, 0) != ((epicsInt32*)p2)[i]) {
if (strtol(&((const char*)pfl1->u.r.field)[i*pfl1->field_size], NULL, 0) != ((epicsInt32*)p2)[i]) {
testDiag("at index=%d: field log has '%s', should be '%d'",
i, &((const char*)pfl1->u.r.field)[i*MAX_STRING_SIZE], ((epicsInt32*)p2)[i]);
i, &((const char*)pfl1->u.r.field)[i*pfl1->field_size], ((epicsInt32*)p2)[i]);
return 0;
}
break;
@@ -120,7 +120,7 @@ static void testHead (const char *title, const char *typ = "") {
off = Offset; \
(void) dbPutField(&offaddr, DBR_LONG, &off, 1); \
pfl = db_create_read_log(pch); \
testOk(pfl->type == dbfl_type_rec, "original field log has type rec"); \
testOk(pfl->type == dbfl_type_ref, "original field log has type ref"); \
pfl2 = dbChannelRunPostChain(pch, pfl); \
testOk(pfl2 == pfl, "call does not drop or replace field_log"); \
testOk(pfl->type == dbfl_type_ref, "filtered field log has type ref"); \
+3 -6
View File
@@ -130,7 +130,7 @@ MAIN(dbndTest)
dbEventCtx evtctx;
int logsFree, logsFinal;
testPlan(77);
testPlan(72);
testdbPrepare();
@@ -171,12 +171,9 @@ MAIN(dbndTest)
"dbnd has one filter with argument in pre chain");
testOk((ellCount(&pch->post_chain) == 0), "dbnd has no filter in post chain");
/* Field logs of type ref and rec: pass any update */
testHead("Field logs of type ref and rec");
fl1.type = dbfl_type_rec;
mustPassTwice(pch, &fl1, "abs field_log=rec", 0., 0);
/* Field logs of type ref: pass any update */
testHead("Field logs of type ref");
fl1.type = dbfl_type_ref;
mustPassTwice(pch, &fl1, "abs field_log=ref", 0., 0);
+4 -2
View File
@@ -30,10 +30,12 @@ is_deeply $menu->choice(2), undef, 'Third choice undefined';
like $menu->toDeclaration, qr/ ^
\s* \# \s* ifndef \s+ test_NUM_CHOICES \s* \n
\s* \/\*\* [^*]* \*\/ \s* \n
\s* typedef \s+ enum \s+ \{ \s* \n
\s* ch1 \s+ \/\* [^*]* \*\/, \s* \n
\s* ch2 \s+ \/\* [^*]* \*\/ \s* \n
\s* ch1 \s+ \/\*\* [^*]* \*\/, \s* \n
\s* ch2 \s+ \/\*\* [^*]* \*\/ \s* \n
\s* \} \s* test \s* ; \s* \n
\s* \/\*\* [^*]* \*\/ \s* \n
\s* \# \s* define \s+ test_NUM_CHOICES \s+ 2 \s* \n
\s* \# \s* endif \s* \n
\s* $ /x, 'C declaration';