Test if disconnected CA link alarms

This commit is contained in:
Michael Davidsaver
2018-11-04 22:04:39 -08:00
parent 63ddb2d4fc
commit 693c1020f2
3 changed files with 23 additions and 1 deletions

View File

@@ -114,6 +114,7 @@ TESTPROD_HOST += regressTest
regressTest_SRCS += regressTest.c
regressTest_SRCS += regressTest_registerRecordDeviceDriver.cpp
TESTFILES += $(COMMON_DIR)/regressTest.dbd ../regressArray1.db ../regressHex.db ../regressLinkMS.db
TESTFILES += ../badCaLink.db
TESTS += regressTest
TESTPROD_HOST += mbbioDirectTest

View File

@@ -0,0 +1,4 @@
record(ai, "ai:disconn") {
field(INP , "invalid CA")
field(UDF , "0")
}

View File

@@ -8,6 +8,7 @@
#include <testMain.h>
#include <dbAccess.h>
#include <errlog.h>
#include <alarm.h>
#include <calcoutRecord.h>
#include <waveformRecord.h>
@@ -123,12 +124,28 @@ void testLinkMS(void)
testdbCleanup();
}
/* lp:1798855 disconnected CA link must alarm */
static
void testCADisconn(void)
{
testDiag("In testCADisconn()");
startRegressTestIoc("badCaLink.db");
testdbPutFieldOk("ai:disconn.PROC", DBF_LONG, 1);
testTodoBegin("lp:1798855");
testdbGetFieldEqual("ai:disconn.SEVR", DBF_LONG, INVALID_ALARM);
testdbGetFieldEqual("ai:disconn.STAT", DBF_LONG, LINK_ALARM);
testTodoEnd();
}
MAIN(regressTest)
{
testPlan(31);
testPlan(34);
testArrayLength1();
testHexConstantLinks();
testLinkMS();
testCADisconn();
return testDone();
}