From 70073e1b690363519971108179bac0c420fb2869 Mon Sep 17 00:00:00 2001 From: zimoch Date: Tue, 29 Mar 2011 15:18:07 +0000 Subject: [PATCH] test to check locking and priorities --- streamApp/tests/testParallelAccess | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 streamApp/tests/testParallelAccess diff --git a/streamApp/tests/testParallelAccess b/streamApp/tests/testParallelAccess new file mode 100755 index 0000000..bd96b70 --- /dev/null +++ b/streamApp/tests/testParallelAccess @@ -0,0 +1,50 @@ +#!/usr/bin/env tclsh +source streamtestlib.tcl + +# Define records, protocol and startup (text goes to files) +# The asynPort "device" is connected to a network TCP socket +# Talk to the socket with send/receive/assure +# Send commands to the ioc shell with ioccmd + +set records { + record (ao, "DZ:slow") + { + field (DTYP, "stream") + field (OUT, "@test.proto slow device") + } + record (ao, "DZ:fast") + { + field (DTYP, "stream") + field (OUT, "@test.proto fast device") + } + record (ao, "DZ:fasthigh") + { + field (DTYP, "stream") + field (OUT, "@test.proto fasthigh device") + field (PRIO, "HIGH") + } +} + +set protocol { + Terminator = LF; + slow { out "slow start"; wait 1000; out "slow finished";} + fast { out "fast"; } + fasthigh { out "fasthigh"; } +} + +set startup { +} + +set debug 0 + +startioc + +ioccmd {dbpf DZ:slow 1} +ioccmd {dbpf DZ:fast 1} +ioccmd {dbpf DZ:fasthigh 1} +assure "fasthigh\n" +assure "slow start\n" +assure "slow finished\n" +assure "fast\n" + +finish