diff --git a/test/validate/Makefile b/test/validate/Makefile index 6c7e5515cbd9283abc2708858540322888aaa711..42c89bf990566fae8967166eab0b06f6b2acb692 100644 --- a/test/validate/Makefile +++ b/test/validate/Makefile @@ -30,6 +30,7 @@ REGRESSION_TESTS_WITH_DB += evflag REGRESSION_TESTS_WITH_DB += monitorEvflag REGRESSION_TESTS_WITH_DB += pvGet REGRESSION_TESTS_WITH_DB += pvGetAsync +REGRESSION_TESTS_WITH_DB += pvGetCancel REGRESSION_TESTS_WITH_DB += pvPutAsync REGRESSION_TESTS_WITH_DB += reassign diff --git a/test/validate/pvGetCancel.db b/test/validate/pvGetCancel.db new file mode 100644 index 0000000000000000000000000000000000000000..99312cc2e44db870ff2eda697a677c664b37ad23 --- /dev/null +++ b/test/validate/pvGetCancel.db @@ -0,0 +1,4 @@ +record(longout,"pvGetCancel1") { +} +record(longout,"pvGetCancel2") { +} diff --git a/test/validate/pvGetCancel.st b/test/validate/pvGetCancel.st new file mode 100644 index 0000000000000000000000000000000000000000..2c25310aa0a33542ae3795796cd764ca3378b425 --- /dev/null +++ b/test/validate/pvGetCancel.st @@ -0,0 +1,53 @@ +/*************************************************************************\ +Copyright (c) 2010-2012 Helmholtz-Zentrum Berlin f. Materialien + und Energie GmbH, Germany (HZB) +This file is distributed subject to a Software License Agreement found +in the file LICENSE that is included with this distribution. +\*************************************************************************/ +program pvGetCancelTest + +/* option +s; */ + +%%#include "../testSupport.h" + +entry { + seq_test_init(8); + testDiag("start"); +} + +ss pvGetCancel { + int x[2]; + int y[2] = {1,2}; + assign x to { "pvGetCancel1", "pvGetCancel2"}; + assign y to { "pvGetCancel1", "pvGetCancel2"}; + typename pvStat status; + + state test { + entry { + testOk1(pvGet(x[0],ASYNC) == pvStatOK); + testOk1(pvGet(x[1],ASYNC) == pvStatOK); + pvGetCancel(x); + testOk1(pvPut(y[0],SYNC) == pvStatOK); + testOk1(pvPut(y[1],SYNC) == pvStatOK); + testOk1(pvGet(x[0],ASYNC) == pvStatOK); + testOk1(pvGet(x[1],ASYNC) == pvStatOK); + } + when (delay(5.0)) { + testFail("pvGet completion timeout"); + testSkip(1,"further tests aborted"); + } exit + when (pvGetComplete(x)) { + testOk1(x[0] == y[0]); + testOk1(x[1] == y[1]); + } state done + } + state done { + when (delay(0.2)) { + } exit + } +} + +exit { + testDiag("exit"); + seq_test_done(); +}