Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

How to "Smoke Test" the new technology agent controller

Download the agntctrl and sdk packages for each given system, create subdirectories for holding the release packages, and unzip them there.

There is some debate about whether to overlay the runtime and sdk packages or keep them separate. My fear with overlaying is that you're likely to miss any error in either package if it is masked by the other. Therefore, I put the agntctrl package in <ac> and the sdk package in <sdk>.


Set up environment variables.

  1. cd <ac>/lib; export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
  2. cd <ac>/bin; export PATH=`pwd`:$PATH
  3. export PATH=<path to the correct Java bin>:$PATH

Note that "the correct Java" is something to think carefully about! It's an important factor to document to ensure thorough testing.

Note that if you're running 32-bit apps on a 64-bit system, you're in for a rough ride separating out the two environments!


Set up your <ac>/config/serviceconfig.xml file (it's empty on delivery) by running ./SetConfig.sh (you are still in the <ac>/bin directory, right?). You can Accept defaults for all values (unless you know you want to test security, or remotely from another system, etc.).

Edit <ac>/agents/*/agent.xml, remove all ".\" prefixes and ".exe" suffixes from all launchinfo lines.

Make sure an AC is not running already:

  1. ps aex | grep -i server
  2. ls -last /tmp/IBMRAC (clean it out if stuff is there)
  3. ipcs (to see if there are unattached shmids! if so, su to root and ipcrm the shmids)


Start the agent controller.

It's important to use the ACStart.sh script now.


Check the AC for minimal functionality: run "./SampleClient"

Here's a sample output... YMMV [in what ways can it vary and still be considered successful?]:

Connected to the Agent Controller on "localhost" at port number 10006

The Time Collector Agent ID: 103

Established a data channel with the agent.

Sending 5 Hello messages over data channel to TimeCollector ...

Start the TimeCollector ...


Stop the TimeCollector ...

Incoming data: Hello from Time Collector Agent - Count 0

Incoming data: Hello from Time Collector Agent - Count 1

Incoming data: Hello from Time Collector Agent - Count 2

Incoming data: Hello from Time Collector Agent - Count 3

Incoming data: Hello from Time Collector Agent - Count 4

Incoming data: Hello from Time Collector Agent - Count 5

Incoming data: Hello from Time Collector Agent - Count 6

Incoming data: Hello from Time Collector Agent - Count 7

Incoming data: Hello from Time Collector Agent - Count 8

Incoming data: Hello from Time Collector Agent - Count 9

All finished Press any key to exit...

Now we're ready to actually use the SDK package to do the three C++ smoke tests.

For each of the sample test directories ConsoleTestClient (and its helper directory SimpleAppl), SampleClient (and its helper directory TimeCollector), and MyFileTransferClient,

  1. cd <to the directory>
  2. make -f *.make
  3. Run each.

Note that they're copied into the <sdk>/bin directory upon successful compilation.

Also note that if the <sdk> and the <ac> are different directories, and you started the AC without having <sdk>/bin on the PATH, you'll need to copy (at least) the SimpleAppl executable over to <ac>/bin before running the ConsoleTestClient. This is because "./" is interpreted in the ac.launch("./SimpleAppl") statement as relative to the AC launch, not the ConsoleTestClient itself.

Also note that unless you explicitly execute the SampleClient you compiled and explicitly make sure the TimeCollector the AC sees is the one you compiled (by replacing the one in <ac>/bin with the one you compiled), you're not really testing your ability to build and run the SDK code.

Finally note that you will need to have a file called "/tmp/big_simple.txt" pre-existent before running the MyFileTransferClient test; subsequent to execution you should find that "/tmp/big_local.txt" is identical to the original file.

Back to the top