diff --git a/modules/database/test/ioc/db/dbPutGetTest.c b/modules/database/test/ioc/db/dbPutGetTest.c index a515d590b..8f539407d 100644 --- a/modules/database/test/ioc/db/dbPutGetTest.c +++ b/modules/database/test/ioc/db/dbPutGetTest.c @@ -317,17 +317,27 @@ static void testPutSpecial(void) { const char val[] = "special"; + const char inp[] = "special.INP"; const char sfx[] = "special.SFX"; testDiag("testPutSpecial()"); + /* There are separate sets of calls to dbPutSpecial() in + * dbPut() and in dbPutFieldLink() so we need to check + * both regular fields and link fields. + */ testdbPutFieldOk(val, DBR_LONG, 1); + testdbPutFieldOk(inp, DBR_STRING, "1.0"); testdbPutFieldOk(sfx, DBR_LONG, SFX_Before); /* Reject early */ testdbPutFieldFail(S_db_Blocked, val, DBR_LONG, 2); testdbGetFieldEqual(val, DBR_LONG, 1); /* Wasn't modified */ + testdbPutFieldFail(S_db_Blocked, inp, DBR_STRING, "2.0"); + testdbGetFieldEqual(inp, DBR_STRING, "1.0"); /* Wasn't modified */ testdbPutFieldOk(sfx, DBR_LONG, SFX_After); /* Reject late */ testdbPutFieldFail(S_db_Blocked, val, DBR_LONG, 3); + testdbPutFieldFail(S_db_Blocked, inp, DBR_STRING, "3.0"); testdbPutFieldOk(sfx, DBR_LONG, SFX_None); testdbPutFieldOk(val, DBR_LONG, 4); + testdbPutFieldOk(inp, DBR_STRING, "4.0"); } @@ -335,7 +345,7 @@ void dbTestIoc_registerRecordDeviceDriver(struct dbBase *); MAIN(dbPutGet) { - testPlan(119); + testPlan(124); testdbPrepare(); testdbMetaDoubleSizes(); diff --git a/modules/database/test/ioc/db/xRecord.c b/modules/database/test/ioc/db/xRecord.c index 001b5ea16..cd8fa74df 100644 --- a/modules/database/test/ioc/db/xRecord.c +++ b/modules/database/test/ioc/db/xRecord.c @@ -79,7 +79,8 @@ static long process(struct dbCommon *pcommon) static long special(struct dbAddr *paddr, int after) { struct xRecord *prec = (struct xRecord *) paddr->precord; - if (dbGetFieldIndex(paddr) != xRecordVAL) { + if (dbGetFieldIndex(paddr) != xRecordVAL && + dbGetFieldIndex(paddr) != xRecordINP) { recGblRecordError(S_db_badField, prec, "x: special"); return S_db_badField; } diff --git a/modules/database/test/ioc/db/xRecord.dbd b/modules/database/test/ioc/db/xRecord.dbd index 7cbbdabe5..620deac61 100644 --- a/modules/database/test/ioc/db/xRecord.dbd +++ b/modules/database/test/ioc/db/xRecord.dbd @@ -47,6 +47,7 @@ recordtype(x) { } field(INP, DBF_INLINK) { prompt("Input Link") + special(SPC_MOD) } field(CLBK, DBF_NOACCESS) { prompt("Processing callback")