diff --git a/test/validate/Makefile b/test/validate/Makefile index 46097e17a459b81d2e7ce0c72a9a223882d0f25d..51c70d516bd3ea93cb63c93a6dd39e12682e0793 100644 --- a/test/validate/Makefile +++ b/test/validate/Makefile @@ -28,6 +28,7 @@ TESTPROD_HOST += syncq REGRESSION_TESTS_WITH_DB += bittypes REGRESSION_TESTS_WITH_DB += evflag REGRESSION_TESTS_WITH_DB += pvGet +REGRESSION_TESTS_WITH_DB += pvGetAsync REGRESSION_TESTS_WITH_DB += pvPutAsync REGRESSION_TESTS_WITH_DB += reassign @@ -77,8 +78,10 @@ seqSoftIoc_LIBS += $(EPICS_BASE_IOC_LIBS) ifeq '$(EPICS_HAS_UNIT_TEST)' '1' seqSoftIoc_SRCS += testSupport.c +REGRESSION_TESTS_vxWorks = $(filter-out pvGetAsync,$(REGRESSION_TESTS)) + PROD_vxWorks = vxTestHarness -vxTestHarness_SRCS += $(REGRESSION_TESTS:%=%.st) +vxTestHarness_SRCS += $(REGRESSION_TESTS_vxWorks:%=%.st) vxTestHarness_SRCS += testSupport.c vxTestHarness_SRCS += vxTestHarness_registerRecordDeviceDriver.cpp vxTestHarness_OBJS += $(EPICS_BASE_BIN)/vxComLibrary @@ -118,7 +121,7 @@ norace.i race.i: ../raceCommon.st $(COMMON_DIR)/vxTestHarnessRegistrars.dbd: ../makeTestDbd.pl $(RM) $@.tmp - $(PERL) ../makeTestDbd.pl $(REGRESSION_TESTS) > $@.tmp + $(PERL) ../makeTestDbd.pl $(REGRESSION_TESTS_vxWorks) > $@.tmp $(MV) $@.tmp $@ $(COMMON_DIR)/vxTestHarness.dbd: $(COMMON_DIR)/vxTestHarnessRegistrars.dbd @@ -132,7 +135,7 @@ st.cmd: ../st.cmd.vxWorks ../makeStCmd.pl $(RM) $@.tmp $(CP) ../st.cmd.vxWorks $@.tmp $(PERL) -MExtUtils::Command -e chmod 644 $@.tmp - $(PERL) ../makeStCmd.pl $(REGRESSION_TESTS) >> $@.tmp + $(PERL) ../makeStCmd.pl $(REGRESSION_TESTS_vxWorks) >> $@.tmp $(MV) $@.tmp $@ ifeq "$(OS_CLASS)" "vxWorks" diff --git a/test/validate/pvGet.db b/test/validate/pvGet.db index bdd9efd1a9d749ceb8a466950717164590bfc6f1..1eb80f2403f2b1bc8e86ae98e9582555780084f1 100644 --- a/test/validate/pvGet.db +++ b/test/validate/pvGet.db @@ -1,2 +1,2 @@ -record(ao,"named_pv") { +record(ao,"pvGet1") { } diff --git a/test/validate/pvGet.st b/test/validate/pvGet.st index 217a13b165050c191aae7b639d962bd698137091..ab66e2696ac64f53298b998ead74e9c2fab68ba8 100644 --- a/test/validate/pvGet.st +++ b/test/validate/pvGet.st @@ -19,7 +19,7 @@ foreign shared, mutex; int anon; assign anon; -#define MAX_GET 10 +#define MAX_GET 5 evflag ef_read_named, ef_read_anon, ef_read_named_sync, ef_read_anon_sync; @@ -30,7 +30,7 @@ entry { ss read_named { int named; - connect named to "named_pv"; + connect named to "pvGet1"; int expected; int n = 0; @@ -112,7 +112,7 @@ ss read_anon { ss read_named_sync { int named; - connect named to "named_pv"; + connect named to "pvGet1"; int expected; int n = 0; @@ -186,7 +186,7 @@ ss read_anon_sync { ss write { int out = 0; - connect out to "named_pv"; + connect out to "pvGet1"; state run { when (efTest(ef_read_named) && efTest(ef_read_anon) && diff --git a/test/validate/pvGetAsync.db b/test/validate/pvGetAsync.db new file mode 100644 index 0000000000000000000000000000000000000000..2b4d1a73bf7f65daccd7423f7a8372804aebf63e --- /dev/null +++ b/test/validate/pvGetAsync.db @@ -0,0 +1,2 @@ +record(longout,"pvGetAsync1") { +} diff --git a/test/validate/pvGetAsync.st b/test/validate/pvGetAsync.st new file mode 100644 index 0000000000000000000000000000000000000000..bb98f2cad537bdc54e402c0892a57772939d8541 --- /dev/null +++ b/test/validate/pvGetAsync.st @@ -0,0 +1,53 @@ +/*************************************************************************\ +Copyright (c) 2010-2011 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 pvGetAsyncTest + +%%#include "../testSupport.h" + +#define NRUNS 100000 + +entry { + seq_test_init(1); + testDiag("start"); +} + +ss pvGetAsync { + int x = 0, old_x = 0; + assign x to "pvGetAsync1"; + int n; + + state init { + when () { + n = 0; + } state get_async + } + state get_async { + when (n == NRUNS) { + testPass("pvGet completed %d times", NRUNS); + } exit + when () { + } state wait_complete + } + state wait_complete { + entry { + pvGet(x,ASYNC); + } + when (delay(5.0)) { + testFail("pvGet completion timeout"); + } exit + when (pvGetComplete(x)) { + } state get_async + exit { + n++; + } + } +} + +exit { + testDiag("exit"); + seq_test_done(); +} diff --git a/test/validate/pvPutAsync.st b/test/validate/pvPutAsync.st index f45ccde509e7da14b2c5c679677336cbe2e84a19..cf9705eae723c3356c83fe3566f6df93c34b04e5 100644 --- a/test/validate/pvPutAsync.st +++ b/test/validate/pvPutAsync.st @@ -37,10 +37,10 @@ ss test1 { } state wait_complete { when (delay(5.0)) { - testFail("pvPut notification timeout"); + testFail("pvPut completion timeout"); } state put_sync when (pvPutComplete(x)) { - testPass("pvPut/ASYNC complete\n"); + testPass("pvPut/ASYNC complete"); } state put_sync } state put_sync { diff --git a/test/validate/raceCommon.st b/test/validate/raceCommon.st index 34ef364c60c4f2d61b76884b312437766ac35789..f3d091521fb8f057dff838965e537a5eca276bee 100644 --- a/test/validate/raceCommon.st +++ b/test/validate/raceCommon.st @@ -18,7 +18,7 @@ sync x to efx; foreign MAX_STRING_SIZE; -#define MAX_TESTS 30 +#define MAX_TESTS 5 entry { seq_test_init(MAX_TESTS);