This is the readme file for the tests of the concurrency service. The test program has been changed to use a configuration file instead of hard coded test procedures. The old test procedures are left in the program for backwards compatibility, but they will be removed at a later point in time. The description of the old tests is in the readme file for the concurrency service in the directory: $TAO_ROOT/orbsvcs/Concurrency_Control please consult this file for a decription of these tests. The new tests are described by this simle test language: start: /* empty */ | cmd_list ; cmd_list: cmd_list cmd | cmd ; cmd: start ; | create ; | create ; | lock ; | lock ; | unlock ; | unlock ; | try_lock ; | try_lock ; | change_mode ; | change_mode ; | lookup ; | sleep ; | repeat ; | wait ; | wait ; ; lock_mode: read | intention_read | upgrade | write | intention_write prompt: " string " If the lock set name is left out the default lock set is used. The repeat command just sets a global variable in the test, i.e. the last repeat command is the one that will take effect - the whole script is run the specified number of times. An example of a script (assuming it's called 'test.cfg' - comments are not supported): // Start a new CC_client with test.txt as script file start test.txt; // Create the lock set "ls1" and register it in the naming service create ls1; // Lock the read lock in the lock set lock ls1 read; // Try the read lock try_lock ls1 read; // sleep two seconds sleep 2; // Wait for the user to press enter wait; // Unlock the read lock in the ls1 lock set unlock ls1 read; // Change the mode of the read lock in the ls1 lock set to write mode change_mode ls1 read write; The test can be run with the command ./CC_client -c test.cfg. There are currentlig the following tests in the $TAO_ROOT/orbsvcs/tests/Concurrency directory: basic_tests.cfg The same as running ./CC_client -b extended_tests.cfg The same as running ./CC_client -e '1;test' ./CC_client -e '2;test' ./CC_client -e '3;test' test.dinphil Dining philosophers. Uses test.phil[1-5] ---------------------------------------- THE IMPLEMENTATION The implementation of the concurrency service tests is located in the $TAO_ROOT/orbsvcs/tests/Concurrency directory and consists of the following files: CC_client.{h,cpp} contain initialization and the main function. CC_tests.{h,cpp} The old tests [-b] and [-e] options to CC_client CC_command.{h,cpp} The commands that can be used in the scripting language are implemented in these files. The list of commands to execute is also implemented here. CC_command.l The lex file for the script language. CC_command.y The yacc file for the script language. CC_command.tab.{h,cpp} and lex.CC_command.cpp Derived files from the lex and yacc files. CC_naming_service.{h,cpp} A wrapper class around the necessary naming service functinallity for the tests. CC_test_utils.{h,cpp} provides a namespace for utility functions. test.* Test scripts for the concurrency service.