From 20071d87f540a1231a6545fbead20e863dd869e9 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 9 Jan 2002 00:55:58 +0000 Subject: [PATCH] added a new parameter to the regresion test --- src/ca/acctst.c | 6 +++++- src/ca/acctstMain.c | 25 ++++++++++++++++++++++--- src/ca/caDiagnostics.h | 3 ++- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/ca/acctst.c b/src/ca/acctst.c index 02531143a..7a26018c1 100644 --- a/src/ca/acctst.c +++ b/src/ca/acctst.c @@ -2111,7 +2111,8 @@ void verifyImmediateTearDown () ca_task_exit (); } -int acctst ( char *pName, unsigned channelCount, unsigned repetitionCount ) +int acctst ( char *pName, unsigned channelCount, + unsigned repetitionCount, enum ca_preemptive_callback_select select ) { chid chan; int status; @@ -2125,6 +2126,9 @@ int acctst ( char *pName, unsigned channelCount, unsigned repetitionCount ) verifyImmediateTearDown (); + status = ca_context_create ( select ); + SEVCHK ( status, NULL ); + verifyDataTypeMacros (); connections = ca_get_ioc_connection_count (); diff --git a/src/ca/acctstMain.c b/src/ca/acctstMain.c index d1027482c..6980e542b 100644 --- a/src/ca/acctstMain.c +++ b/src/ca/acctstMain.c @@ -2,15 +2,21 @@ #include #include +#include "cadef.h" #include "caDiagnostics.h" int main ( int argc, char **argv ) { unsigned channelCount; unsigned repetitionCount; + enum ca_preemptive_callback_select preempt; + int aBoolean; - if ( argc < 2 || argc > 4 ) { - printf ( "usage: %s [channel count] [repetition count]\n", argv[0] ); + + if ( argc < 2 || argc > 5 ) { + printf ( +"usage: %s [channel count] [repetition count] [enable preemptive callback]\n", + argv[0] ); } if ( argc >= 3 ) { @@ -27,7 +33,20 @@ int main ( int argc, char **argv ) repetitionCount = 1; } - acctst ( argv[1], channelCount, repetitionCount ); + if ( argc >= 5 ) { + aBoolean = atoi ( argv[4] ); + } + else { + aBoolean = 0; + } + if ( aBoolean ) { + preempt = ca_disable_preemptive_callback; + } + else { + preempt = ca_enable_preemptive_callback; + } + + acctst ( argv[1], channelCount, repetitionCount, preempt ); return 0; } diff --git a/src/ca/caDiagnostics.h b/src/ca/caDiagnostics.h index c09c6bc0c..8efba8dfa 100644 --- a/src/ca/caDiagnostics.h +++ b/src/ca/caDiagnostics.h @@ -7,7 +7,8 @@ extern "C" { enum appendNumberFlag {appendNumber, dontAppendNumber}; int catime ( char *channelName, unsigned channelCount, enum appendNumberFlag appNF ); -int acctst ( char *pname, unsigned channelCount, unsigned repititionCount ); +int acctst ( char *pname, unsigned channelCount, unsigned repititionCount, + enum ca_preemptive_callback_select select ); #define CATIME_OK 0 #define CATIME_ERROR -1