Skip to content

Commit

Permalink
regressTest: attempt to fix spurious failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Oct 12, 2021
1 parent a82da8e commit 8bb8105
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/database/test/std/rec/regressLinkSevr.db
Expand Up @@ -15,4 +15,9 @@ record(stringin, "si2") {
}
record(longin, "li2") {
field(INP, "ai.SEVR CA")
field(FLNK, "cnt")
}

record(calc, "cnt") {
field(CALC, "VAL+1")
}
7 changes: 7 additions & 0 deletions modules/database/test/std/rec/regressTest.c
Expand Up @@ -171,11 +171,14 @@ void testLongCalc(void)
static
void testLinkSevr(void)
{
testMonitor *mon;
dbChannel *chan;
startRegressTestIoc("regressLinkSevr.db");
dbCaSync(); /* wait for CA links to connect */
dbCaSync(); /* wait for initial update */

mon = testMonitorCreate("cnt", DBE_VALUE, 0);

chan = dbChannelCreate("ai.SEVR");
if(!chan)
testAbort("Can't create channel for ai.SEVR");
Expand All @@ -193,6 +196,8 @@ void testLinkSevr(void)
testdbGetFieldEqual("ai.SEVR", DBF_STRING, "INVALID");

testdbPutFieldOk("si1.PROC", DBF_LONG, 1);
testMonitorWait(mon);
dbCaSync(); /* wait for update */

testdbGetFieldEqual("si1", DBF_STRING, "INVALID");
testdbGetFieldEqual("li1", DBF_LONG, INVALID_ALARM);
Expand All @@ -201,6 +206,8 @@ void testLinkSevr(void)
testTodoEnd();
testdbGetFieldEqual("li2", DBF_LONG, INVALID_ALARM);

testMonitorDestroy(mon);

testIocShutdownOk();
testdbCleanup();
}
Expand Down

0 comments on commit 8bb8105

Please sign in to comment.