3 This is the readme file for the tests of the concurrency service.
5 The test program has been changed to use a configuration file instead of
6 hard coded test procedures. The old test procedures are left in the
7 program for backwards compatibility, but they will be removed at a later
10 The description of the old tests is in the readme file for the
11 concurrency service in the directory:
12 $TAO_ROOT/orbsvcs/Concurrency_Control
13 please consult this file for a decription of these tests.
15 The new tests are described by this simle test language:
21 cmd_list: cmd_list cmd
25 cmd: start <config_file_name> ;
26 | create <lock_set_name> ;
28 | lock <lock_set_name> <lock_mode> ;
30 | unlock <lock_set_name> <lock_mode> ;
31 | unlock <lock_mode> ;
32 | try_lock <lock_set_name> <lock_mode> ;
33 | try_lock <lock_mode> ;
34 | change_mode <lock_set_name> <lock_mode> <lock_mode> ;
35 | change_mode <lock_mode> <lock_mode> ;
36 | lookup <lock_set_name> ;
43 lock_mode: read | intention_read | upgrade | write | intention_write
47 If the lock set name is left out the default lock set is used. The
48 repeat command just sets a global variable in the test, i.e. the last
49 repeat command is the one that will take effect - the whole script is
50 run the specified number of times.
52 An example of a script (assuming it's called 'test.cfg' - comments are
55 // Start a new CC_client with test.txt as script file
57 // Create the lock set "ls1" and register it in the naming service
59 // Lock the read lock in the lock set
65 // Wait for the user to press enter
67 // Unlock the read lock in the ls1 lock set
69 // Change the mode of the read lock in the ls1 lock set to write mode
70 change_mode ls1 read write;
72 The test can be run with the command ./CC_client -c test.cfg.
74 There are currentlig the following tests in the
75 $TAO_ROOT/orbsvcs/tests/Concurrency
77 basic_tests.cfg The same as running ./CC_client -b
78 extended_tests.cfg The same as running ./CC_client -e '1;test'
79 ./CC_client -e '2;test'
80 ./CC_client -e '3;test'
81 test.dinphil Dining philosophers. Uses test.phil[1-5]
83 ----------------------------------------
87 The implementation of the concurrency service tests is located in
88 the $TAO_ROOT/orbsvcs/tests/Concurrency directory and consists of
91 CC_client.{h,cpp} contain initialization and the main function.
93 CC_tests.{h,cpp} The old tests [-b] and [-e] options to CC_client
95 CC_command.{h,cpp} The commands that can be used in the scripting
96 language are implemented in these files. The list of
97 commands to execute is also implemented here.
99 CC_command.l The lex file for the script language.
101 CC_command.y The yacc file for the script language.
103 CC_command.tab.{h,cpp} and lex.CC_command.cpp Derived files from
104 the lex and yacc files.
106 CC_naming_service.{h,cpp} A wrapper class around the necessary
107 naming service functinallity for the tests.
109 CC_test_utils.{h,cpp} provides a namespace for utility functions.
111 test.* Test scripts for the concurrency service.