test for RPRO/PUTF regression
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <testMain.h>
|
||||
#include <dbUnitTest.h>
|
||||
#include <errlog.h>
|
||||
#include <dbCommon.h>
|
||||
#include <dbAccess.h>
|
||||
#include <epicsEvent.h>
|
||||
@@ -16,6 +17,7 @@
|
||||
#include <iocsh.h>
|
||||
#include "registryFunction.h"
|
||||
#include <subRecord.h>
|
||||
#include <dbScan.h>
|
||||
|
||||
epicsEventId done;
|
||||
static int waitFor;
|
||||
@@ -28,11 +30,17 @@ long doneSubr(subRecord *prec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
void dummydone(void *usr, struct dbCommon* prec)
|
||||
{
|
||||
epicsEventMustTrigger(done);
|
||||
}
|
||||
|
||||
void asyncproctest_registerRecordDeviceDriver(struct dbBase *);
|
||||
|
||||
MAIN(asyncproctest)
|
||||
{
|
||||
testPlan(21);
|
||||
testPlan(25);
|
||||
|
||||
done = epicsEventMustCreate(epicsEventEmpty);
|
||||
|
||||
@@ -99,6 +107,26 @@ MAIN(asyncproctest)
|
||||
testdbGetFieldEqual("chain3", DBF_LONG, 7);
|
||||
testdbGetFieldEqual("chain3.A", DBF_LONG, 2);
|
||||
|
||||
testDiag("===== Chain 4 ======");
|
||||
|
||||
{
|
||||
dbCommon *dummy=testdbRecordPtr("chain4_dummy");
|
||||
|
||||
testdbPutFieldOk("chain4_pos.PROC", DBF_LONG, 0);
|
||||
|
||||
/* sync once queue to wait for any queued RPRO */
|
||||
scanOnceCallback(dummy, dummydone, NULL);
|
||||
|
||||
if (epicsEventWaitWithTimeout(done, 10.0) != epicsEventOK)
|
||||
testAbort("Processing timed out");
|
||||
|
||||
testTodoBegin("Bug");
|
||||
testdbGetFieldEqual("chain4_pos", DBF_SHORT, 1);
|
||||
testdbGetFieldEqual("chain4_rel", DBF_SHORT, 1);
|
||||
testdbGetFieldEqual("chain4_lim", DBF_SHORT, 1);
|
||||
testTodoEnd();
|
||||
}
|
||||
|
||||
testIocShutdownOk();
|
||||
|
||||
testdbCleanup();
|
||||
|
||||
@@ -53,3 +53,30 @@ record(sub, "done3") {
|
||||
field(FLNK, "chain3")
|
||||
field(TPRO, "$(TPRO=)")
|
||||
}
|
||||
|
||||
|
||||
# loop breaking regression
|
||||
# should _not_ RPRO
|
||||
record(calcout,"chain4_pos") {
|
||||
field(CALC, "E:=E+1;E")
|
||||
field(OUT,"chain4_rel.A PP")
|
||||
field(TPRO, "$(TPRO=)")
|
||||
}
|
||||
|
||||
record(calc,"chain4_rel") {
|
||||
field(CALC, "E:=E+1;E")
|
||||
field(FLNK,"chain4_lim")
|
||||
field(TPRO, "$(TPRO=)")
|
||||
}
|
||||
|
||||
record(calc,"chain4_lim") {
|
||||
field(CALC, "E:=E+1;E")
|
||||
field(INPA,"chain4_pos PP")
|
||||
field(INPB,"chain4_pos.HIGH PP")
|
||||
field(INPC,"chain4_pos.LOW PP")
|
||||
field(TPRO, "$(TPRO=)")
|
||||
}
|
||||
|
||||
record(bo, "chain4_dummy") {
|
||||
field(TPRO, "$(TPRO=)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user