summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortworm <tworm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-08 20:03:28 +0000
committertworm <tworm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-08 20:03:28 +0000
commit55cba9148065b50988d169de23ea9b5f8019e455 (patch)
treeb86adf2fc53942dc637287ccfa78b02f287e40bd
parent62434476fe8be4a2ade3b0c95d0fbf875312d37d (diff)
downloadATCD-55cba9148065b50988d169de23ea9b5f8019e455.tar.gz
Tests for the concurrency service
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.basic21
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.dinphil12
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.e12
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.extended4
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.phil16
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.phil26
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.phil36
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.phil46
-rw-r--r--TAO/orbsvcs/tests/Concurrency/test.phil56
9 files changed, 69 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/Concurrency/test.basic b/TAO/orbsvcs/tests/Concurrency/test.basic
new file mode 100644
index 00000000000..d0e5ee8e650
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.basic
@@ -0,0 +1,21 @@
+create test;
+lock test read;
+try_lock test read;
+unlock test read;
+unlock test read;
+lock test write;
+try_lock test write;
+unlock test write;
+lock test upgrade;
+try_lock test upgrade;
+unlock test upgrade;
+lock test intention_read;
+try_lock test intention_read;
+unlock test intention_read;
+unlock test intention_read;
+lock test intention_write;
+try_lock test intention_write;
+unlock test intention_write;
+create ls2;
+unlock ls2 write;
+exception IDL:CosConcurrencyControl/LockNotHeld:1.0;
diff --git a/TAO/orbsvcs/tests/Concurrency/test.dinphil b/TAO/orbsvcs/tests/Concurrency/test.dinphil
new file mode 100644
index 00000000000..81b02f90ee7
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.dinphil
@@ -0,0 +1,12 @@
+print "Creating lock sets";
+create fork1;
+create fork2;
+create fork3;
+create fork4;
+create fork5;
+print "Running the tests";
+start test.phil1;
+start test.phil2;
+start test.phil3;
+start test.phil4;
+start test.phil5;
diff --git a/TAO/orbsvcs/tests/Concurrency/test.e1 b/TAO/orbsvcs/tests/Concurrency/test.e1
new file mode 100644
index 00000000000..1c1e4517680
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.e1
@@ -0,0 +1,2 @@
+wait "Press return";
+unlock ls1 write;
diff --git a/TAO/orbsvcs/tests/Concurrency/test.extended b/TAO/orbsvcs/tests/Concurrency/test.extended
new file mode 100644
index 00000000000..330f03e39c5
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.extended
@@ -0,0 +1,4 @@
+create ls1;
+lock ls1 write;
+wait "Run test.e1 - then press return";
+lock ls1 write;
diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil1 b/TAO/orbsvcs/tests/Concurrency/test.phil1
new file mode 100644
index 00000000000..19d25e04ef9
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.phil1
@@ -0,0 +1,6 @@
+repeat 100;
+lock fork2 write;
+lock fork1 write;
+print "Phil 1 eating";
+unlock fork2 write;
+unlock fork1 write;
diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil2 b/TAO/orbsvcs/tests/Concurrency/test.phil2
new file mode 100644
index 00000000000..7f02934cf4d
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.phil2
@@ -0,0 +1,6 @@
+repeat 100;
+lock fork2 write;
+lock fork3 write;
+print "Phil 2 eating";
+unlock fork2 write;
+unlock fork3 write;
diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil3 b/TAO/orbsvcs/tests/Concurrency/test.phil3
new file mode 100644
index 00000000000..4d808e88ac7
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.phil3
@@ -0,0 +1,6 @@
+repeat 100;
+lock fork3 write;
+lock fork4 write;
+print "Phil 3 eating";
+unlock fork3 write;
+unlock fork4 write;
diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil4 b/TAO/orbsvcs/tests/Concurrency/test.phil4
new file mode 100644
index 00000000000..36910b9a9aa
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.phil4
@@ -0,0 +1,6 @@
+repeat 100;
+lock fork4 write;
+lock fork5 write;
+print "Phil 4 eating";
+unlock fork4 write;
+unlock fork5 write;
diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil5 b/TAO/orbsvcs/tests/Concurrency/test.phil5
new file mode 100644
index 00000000000..b5f5058eac6
--- /dev/null
+++ b/TAO/orbsvcs/tests/Concurrency/test.phil5
@@ -0,0 +1,6 @@
+repeat 100;
+lock fork5 write;
+lock fork1 write;
+print "Phil 5 eating";
+unlock fork5 write;
+unlock fork1 write;