mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Christophe Sovant
24.14.2008 b017349867f2c33f0a671a3fefacd6774dcbace2
Fix for Issue 3025: results should be the same on all OS/platforms
31 files modified
949 ■■■■ changed files
opends/tests/staf-tests/functional-tests/config/replication/3server_topology.txt 6 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/config/replication/basic_topology.txt 4 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu.xml 2 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldapcompare_checkbehavior.xml 4 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldappasswordmodify_checkbehavior.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldapsearch_checkbehavior.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldif-diff_checkbehavior.xml patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldifmodify_checkbehavior.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldifsearch_checkbehavior.xml 70 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_list-backends_checkbehavior.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_make-ldif_checkbehavior.xml patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_rebuild-index_checkbehavior.xml 22 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/clu/clu_verify-index_checkbehavior.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_test.xml 17 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/monitoring/monitoring_componant.xml 128 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_7bit.xml 26 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/sample/sample.xml 24 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/setup/directory_manager.xml 112 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/setup/import.xml 12 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/setup/ports.xml 221 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/setup/security.xml 93 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp.xml 3 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_mibvalues.xml 41 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_status.xml 24 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/ant/build.xml 2 ●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/dsadm.xml 5 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/environment.xml 12 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/ldap.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/snmp.xml 8 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/utils.xml 73 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/webcontainer.xml 4 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/config/replication/3server_topology.txt
@@ -26,7 +26,7 @@
Hostname: localhost
Directory: /var/tmp/opends-synchro-tests/server1
Port: 11389
Adminport: 14444
Adminport: 11444
Sslport: 11636
Jmxport: 11689
RootDn: cn=directory manager
@@ -41,7 +41,7 @@
Hostname: localhost
Directory: /var/tmp/opends-synchro-tests/server2
Port: 22389
Adminport: 24444
Adminport: 22444
Sslport: 22636
Jmxport: 22689
RootDn: cn=directory manager
@@ -56,7 +56,7 @@
Hostname: localhost
Directory: /var/tmp/opends-synchro-tests/server3
Port: 33389
Adminport: 34444
Adminport: 33444
Sslport: 33636
Jmxport: 33689
RootDn: cn=directory manager
opends/tests/staf-tests/functional-tests/config/replication/basic_topology.txt
@@ -26,7 +26,7 @@
Hostname: localhost
Directory: /var/tmp/opends-synchro-tests/server1
Port: 11389
Adminport: 14444
Adminport: 11444
Sslport: 11636
Jmxport: 11689
RootDn: cn=directory manager
@@ -40,7 +40,7 @@
Hostname: localhost
Directory: /var/tmp/opends-synchro-tests/server2
Port: 22389
Adminport: 24444
Adminport: 22444
Sslport: 22636
Jmxport: 22689
RootDn: cn=directory manager
opends/tests/staf-tests/functional-tests/testcases/clu/clu.xml
@@ -30,9 +30,11 @@
  <defaultcall function="main_clu"/>
  
  <function name="main_clu">
     <function-list-args>
      <function-required-arg name="STAXParentID"/>
    </function-list-args>   
    <sequence>
      
      <block name="'clu'">
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldapcompare_checkbehavior.xml
@@ -85,7 +85,7 @@
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'dsDn'             : ['postalCode=63792' ,
                'dsDn'             : ['postalCode:63792' ,
                                      '%s' % dsdn] ,
                'expectedRC'       : 6
                }
@@ -129,7 +129,7 @@
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'dsDn'             : ['postalCode=00000' ,
                'dsDn'             : ['postalCode:00000' ,
                                      '%s' % dsdn] ,
                'expectedRC'       : 5
                }
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldappasswordmodify_checkbehavior.xml
@@ -151,7 +151,7 @@
            #@TestStep            Do an ldappasswordmodify to change user
                                  password.
            #@TestPostamble       none
            #@TestResult          Success if ldappasswordmodify returns 0.
            #@TestResult          Success if ldappasswordmodify returns 50.
          -->
          <testcase name="getTestCaseName
          ('ldappasswordmodify: user cannot modify pwd for another user')">
@@ -168,11 +168,11 @@
                {
                'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : 'dn:uid=user.0,%s' % basedn ,
                'dsInstanceDn'     : 'uid=user.0,%s' % basedn ,
                'dsInstancePswd'   : 'newpassword' ,
                'dsAuthzID'        : 'dn:uid=user.1,%s' % basedn ,
                'dsNewPassword'    : 'newpassword' ,
                'expectedRC'       : 49
                'expectedRC'       : 50
                }
              </call>
              
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldapsearch_checkbehavior.xml
@@ -575,7 +575,7 @@
            #@TestMarker          ldapsearch check behavior tests
            #@TestName            ldapsearch: check behavior with a filter file
                                  (containing one filter) and search attribute
            #@TestIssue           3041
            #@TestIssue           none
            #@TestPurpose         Verify the output of ldapsearch with
                                  filter option.
            #@TestPreamble        none
@@ -636,10 +636,6 @@
                }
              </call>
              
              <script>
                knownIssue(3041)
              </script>
              <call function="'testCase_Postamble'"/>
              
            </sequence>
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldif-diff_checkbehavior.xml
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldifmodify_checkbehavior.xml
@@ -60,7 +60,7 @@
          <!--- Test Case information
            #@TestMarker          ldifmodify check behavior tests
            #@TestName            ldifmodify: add, delete and modify operations
            #@TestIssue           3111
            #@TestIssue           none
            #@TestPurpose         Test ldifmodify with add, delete and modify 
                                  operations
            #@TestPreamble        none
@@ -106,10 +106,6 @@
                }
              </call>
              
              <script>
                knownIssue(3111)
              </script>
              <call function="'testCase_Postamble'"/>
              
            </sequence>
opends/tests/staf-tests/functional-tests/testcases/clu/clu_ldifsearch_checkbehavior.xml
@@ -203,7 +203,7 @@
          <!--- Test Case information
            #@TestMarker          ldifsearch check behavior tests
            #@TestName            ldifsearch: check with sizeLimit option
            #@TestIssue           3041
            #@TestIssue           none
            #@TestPurpose         Verify that the entries returned by ldifseach
                                  are the same than the entries returned by
                                  ldapsearch
@@ -224,56 +224,28 @@
                'ldifsearch: sizeLimit option'
              </message>
              
              <call function="'ldapSearchWithScript'">
                {
                'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'   : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
                'dsSizeLimit'    : '50' ,
                'dsBaseDN'       : basedn ,
                'dsFilter'       : 'uid=user.1*' ,
                'outputFile'     : 'size_ldapsearch.out' ,
                'outputPath'     : DIRECTORY_INSTANCE_DIR ,
                'expectedRC'     : 4 ,
                'logStderr'      : False
                }
              </call>
              <call function="'ldifSearchWithScript'">
                {
                'dsLdifFile'   : dsfilename ,
                'dsSizeLimit'  : '50' ,
                'dsBaseDN'     : basedn ,
                'dsFilter'     : 'uid=user.1*' ,
                'dsOutputFile' : '%s/size_ldifsearch.out' \
                                 % DIRECTORY_INSTANCE_DIR ,
                'expectedRC'   : 4
                }                
              </call>              
              
              <call function="'LdifDiffWithScript'">
                {
                'sourceLdif' : '%s/size_ldifsearch.out' \
                % DIRECTORY_INSTANCE_DIR ,
                'targetLdif' : '%s/size_ldapsearch.out' \
                % DIRECTORY_INSTANCE_DIR ,
                'outputLdif' : '%s/size_ldifsearch.diff' \
                % DIRECTORY_INSTANCE_DIR
                }
              </call>
              <call function="'checktestRC'">
                {
                'returncode' : STAXResult ,
                'result'     : STAXResult
                }
              </call>
              <script>
                knownIssue(3041)
                returnString = STAXResult[0][1]
              </script>
              
              <call function="'CheckMatches'">
                {
                'string2find' : 'dn: ' ,
                'mainString'  : returnString ,
                'nbExpected'  : 50
                }
              </call>
              <call function="'testCase_Postamble'"/>
              
            </sequence>
@@ -320,10 +292,20 @@
                }                
              </call>
              
              <call function="'compareFile'">
              <call function="'LdifDiffWithScript'">
                { 
                'outputFile' : 'ldifsearch_filterfile_and_attribute.out' ,
                'refFile'    : 'ldapsearch_filterfile_and_attribute.ref'
                'sourceLdif' : '%s/ldifsearch_filterfile_and_attribute.out' \
                               % DIRECTORY_INSTANCE_DIR ,
                'targetLdif' : '%s/clu/ldapsearch_filterfile_and_attribute.ref'\
                               % remote.data ,
                'outputLdif' : '%s/ldifmodify.diff' % DIRECTORY_INSTANCE_DIR
                }
              </call>
              <call function="'checktestRC'">
                {
                'returncode' : STAXResult ,
                'result'     : STAXResult
                }
              </call>
              
@@ -337,7 +319,7 @@
            #@TestMarker          ldifsearch check behavior tests
            #@TestName            ldifsearch: check behavior with a filter file 
                                  containing multiple filters
            #@TestIssue           3042
            #@TestIssue           none
            #@TestPurpose         Verify the output of ldifsearch with
                                  filter option.
            #@TestPreamble        none
@@ -378,10 +360,6 @@
                }
              </call> 
              
              <script>
                knownIssue(3042)
              </script>
              <call function="'testCase_Postamble'"/>
              
            </sequence>
opends/tests/staf-tests/functional-tests/testcases/clu/clu_list-backends_checkbehavior.xml
@@ -296,7 +296,7 @@
          <!--- Test Case information
            #@TestMarker          list-backends check behavior tests
            #@TestName            list-backends: invalid baseDN
            #@TestIssue           2594
            #@TestIssue           none
            #@TestPurpose         Test list-backends with an invalid baseDN
            #@TestPreamble        none
            #@TestStep            Do an list-backends with an invalid baseDN.
@@ -335,10 +335,6 @@
                }
              </call>
              
              <script>
                knownIssue(2594)
              </script>
              <call function="'testCase_Postamble'"/>
              
            </sequence>
opends/tests/staf-tests/functional-tests/testcases/clu/clu_make-ldif_checkbehavior.xml
opends/tests/staf-tests/functional-tests/testcases/clu/clu_rebuild-index_checkbehavior.xml
@@ -333,7 +333,7 @@
          <!--- Test Case information
            #@TestMarker          rebuild-index check behavior tests
            #@TestName            rebuild-index: after creation
            #@TestIssue           3102
            #@TestIssue           none
            #@TestPurpose         Verify that rebuild-index command is
                                  successfull on a newly created index
                                  and that the output is correct.
@@ -377,8 +377,8 @@
              
              <script>
                msg1 = 'Due to changes in the configuration, index'
                msg2 = 'dc_com_st.equality is currently operating in a'
                msg3 = 'degraded state and must be rebuilt before it can used'
                msg2 = 'dc_com_st is currently operating in a degraded'
                msg3 = 'state and must be rebuilt before it can be used'
              </script>                 
              <call function="'checktestString'">
                { 
@@ -426,8 +426,8 @@
              
              <script>
                msg1 = 'Due to changes in the configuration, index'
                msg2 = 'dc_com_st.equality is currently operating in a'
                msg3 = 'degraded state and must be rebuilt before it can used'
                msg2 = 'dc_com_st is currently operating in a degraded'
                msg3 = 'state and must be rebuilt before it can be used'
              </script>                 
              <call function="'checktestString'">
                { 
@@ -474,8 +474,8 @@
              
              <script>
                msg1 = 'Due to changes in the configuration, index'
                msg2 = 'dc_com_st.equality is currently operating in a'
                msg3 = 'degraded state and must be rebuilt before it can used'
                msg2 = 'dc_com_st is currently operating in a degraded'
                msg3 = 'state and must be rebuilt before it can be used'
              </script>                 
              <call function="'checktestStringNotPresent'">
                { 
@@ -511,8 +511,8 @@
              
              <script>
                msg1 = 'Due to changes in the configuration, index'
                msg2 = 'dc_com_st.equality is currently operating in a'
                msg3 = 'degraded state and must be rebuilt before it can used'
                msg2 = 'dc_com_st is currently operating in a degraded'
                msg3 = 'state and must be rebuilt before it can be used'
              </script>                 
              <call function="'checktestStringNotPresent'">
                { 
@@ -558,10 +558,6 @@
                }
              </call>
              
              <script>
                knownIssue(3102)
              </script>
              <call function="'testCase_Postamble'"/>
              
            </sequence>
opends/tests/staf-tests/functional-tests/testcases/clu/clu_verify-index_checkbehavior.xml
@@ -195,7 +195,7 @@
          <!--- Test Case information
            #@TestMarker          verify-index check behavior tests
            #@TestName            verify-index: check with clean option
            #@TestIssue           3102
            #@TestIssue           none
            #@TestPurpose         Verify that verify-index command is successful
                                  and the output is correct.
            #@TestPreamble        none
@@ -274,10 +274,6 @@
                }
              </call>
              <script>
                knownIssue(3102)
              </script>
              <call function="'testCase_Postamble'"/>
              
            </sequence>
opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_test.xml
@@ -42,9 +42,9 @@
          CurrentTestPath['suite'] = STAXCurrentBlock
        </script>
        <call function="'testSuite_Preamble'"/>
        <sequence>
          <message>'TESTS_DATA_DIR=%s ' % (local.data)
          </message>
        <message>'TESTS_DATA_DIR=%s ' % (local.data)</message>
          <!--- Test Case information
              #@TestMarker          test
              #@TestName            test: test webcontainer
@@ -58,8 +58,6 @@
              #@TestSteps           for each SOAP result, compare it with reference (testXYZ.run vs testXYZ.res)
              #@TestResult          Success if returns 0.
          -->
          <testcase name="getTestCaseName('dsml suites')">
            <sequence>
              <message>'List DSML suites families'</message>
@@ -253,15 +251,6 @@
                </sequence>
              </iterate>
              <call function="'checktestRC'">
                {
                'returncode' : RC ,
                'result'     : STAFResult
                }
              </call>
            </sequence>
          </testcase>
        </sequence>
        <call function="'testSuite_Postamble'"/>
      </sequence>
    </block>
opends/tests/staf-tests/functional-tests/testcases/monitoring/monitoring_componant.xml
@@ -45,134 +45,6 @@
#@TestScript          monitoring_componants.xml
#@TestHTMLLink        http://opends.dev.java.net/
-->
        <!---
#@TestMarker            monitoring componants
#@TestName              monitoring componants
#@TestIssue             Check the monitoring of the componant LDIF connection handler
#@TestPreamble          none
#@TestStep               Check the entry on cn=LDIF Connection Handler,cn=monitor is available
#@TestStep              Disable the LDIF connection handler componant
#@TestStep              Check the entry on cn=LDIF Connection Handler,cn=monitor is not more available
#@TestPostamble         none
-->
        <testcase name="getTestCaseName('LDIF connection handler monitoring')">
          <sequence>
            <call function="'testCase_Preamble'"/>
            <!-- Check the entry on cn=LDIF Connection Handler,cn=monitor is available -->
            <message>'######  Monitor the LDIF connection handler ###### '</message>
            <call function="'SearchObject'">
              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
              'dsInstancePort'     : DIRECTORY_INSTANCE_PORT ,
              'dsInstanceDn'       : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'     : DIRECTORY_INSTANCE_PSWD ,
              'dsBaseDN'           : 'cn=LDIF Connection Handler,cn=monitor',
              'dsFilter'           : 'objectclass=*',
              'expectedRC'     :  0 }
            </call>
            <message>'-- Disable the LDIF Connection Handler --'</message>
            <call function="'dsconfig'">
              { 'dsInstanceHost'     : DIRECTORY_INSTANCE_HOST,
              'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
              'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
              'subcommand'           : 'set-connection-handler-prop' ,
              'objectType'           : 'handler-name',
              'objectName'           : 'LDIF Connection Handler',
              'optionsString'        : '--set enabled:false',
              'expectedRC'           : 0 }
            </call>
            <!-- Check the entry on cn=LDIF Connection Handler,cn=monitor is not available -->
            <message>'######  Monitor the LDIF Connection Handler  ###### '</message>
            <call function="'SearchObject'">
              { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST ,
              'dsInstancePort'      : DIRECTORY_INSTANCE_PORT ,
              'dsInstanceDn'        : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
              'dsBaseDN'            : 'cn=LDIF Connection Handler,cn=monitor',
              'dsFilter'            : 'objectclass=*',
              'expectedRC'      :  32 }
            </call>
            <message>'-- Enabled the LDIF Connection Handler --'</message>
            <call function="'dsconfig'">
              { 'dsInstanceHost'     : DIRECTORY_INSTANCE_HOST,
              'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
              'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
              'subcommand'           : 'set-connection-handler-prop' ,
              'objectType'           : 'handler-name',
              'objectName'           : 'LDIF Connection Handler',
              'optionsString'        : '--set enabled:true',
              'expectedRC'           : 0 }
            </call>
            <call function="'testCase_Postamble'"/>
          </sequence>
        </testcase>
        <!---
#@TestMarker            monitoring componants
#@TestName              monitoring componants
#@TestPurpose           Check the monitoring of a NEW componant LDIF connection handler
#@TestIssue             2884
#@TestPreamble          none
#@TestStep              Create a new LDIF connection handler
#@TestStep              Check the entry on cn=myLDIF,cn=monitor is available
#@TestStep              Delete the new LDIF connection handler componant
#@TestPostamble         none
-->
        <testcase name="getTestCaseName('Monitoring a new LDIF connection handler')">
          <sequence>
            <call function="'testCase_Preamble'"/>
            <message>'-- Create a new  LDIF Connection Handler --'</message>
            <call function="'dsconfig'">
              { 'dsInstanceHost'     : DIRECTORY_INSTANCE_HOST,
              'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
              'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
              'subcommand'           : 'create-connection-handler' ,
              'objectType'           : 'handler-name',
              'objectName'           : 'myLDIF',
              'optionsString'        : '--type ldif --set enabled:true',
              'expectedRC'           : 0 }
            </call>
            <!-- Check the entry on cn=myLDIF,cn=monitor is available -->
            <message>'######  Monitor the new LDIF connection handler ###### '</message>
            <call function="'SearchObject'">
              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
              'dsInstancePort'     : DIRECTORY_INSTANCE_PORT ,
              'dsInstanceDn'       : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'     : DIRECTORY_INSTANCE_PSWD ,
              'dsBaseDN'           : 'cn=myLDIF,cn=monitor',
              'dsFilter'           : 'objectclass=*',
              'expectedRC'     :  0 }
            </call>
            <message>'-- Delete the new  LDIF Connection Handler --'</message>
            <call function="'dsconfig'">
              { 'dsInstanceHost'     : DIRECTORY_INSTANCE_HOST,
              'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
              'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
              'subcommand'           : 'delete-connection-handler' ,
              'objectType'           : 'handler-name',
              'objectName'           : 'myLDIF',
              'expectedRC'           : 0 }
            </call>
            <script>
        knownIssue(2884)
            </script>
            <call function="'testCase_Postamble'"/>
          </sequence>
        </testcase>
        
        <!---
#@TestMarker            monitoring componants
opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_7bit.xml
@@ -118,6 +118,18 @@
      }
    </call>
    <!-- Cleanup -->
    <message>'######  Cleanup ###### '</message>
    <message>'-- Delete the test entry --'</message>
    <call function="'DeleteEntry'">
      { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
      'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
      'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
      'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
      'dsBaseDN'         : 'uid=testuser_7bit,%s' % DIRECTORY_INSTANCE_SFX,
      'expectedRC'       : 'noCheck'
      }
    </call>
              
    <call function="'testCase_Postamble'"/>
  </sequence>
@@ -178,6 +190,18 @@
      }
    </call>
    <!-- Cleanup -->
    <message>'######  Cleanup ###### '</message>
    <message>'-- Delete the test entry --'</message>
    <call function="'DeleteEntry'">
      { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
      'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
      'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
      'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
      'dsBaseDN'         : 'uid=testuser_7bit,%s' % DIRECTORY_INSTANCE_SFX,
      'expectedRC'       : 'noCheck'
      }
    </call>
           
    <call function="'testCase_Postamble'"/>
  </sequence>
@@ -239,7 +263,6 @@
      }
    </call>
    <!-- Cleanup -->
    <message>'######  Cleanup ###### '</message>    
    <message>'-- Delete the test entry --'</message>
@@ -252,7 +275,6 @@
      }
    </call>
                     
    <call function="'testCase_Postamble'"/>
  </sequence>
 </testcase>     
opends/tests/staf-tests/functional-tests/testcases/sample/sample.xml
@@ -26,17 +26,19 @@
 !      Copyright 2007-2008 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="sample" />
  <function name="sample">
  <defaultcall function="main_sample" />
  <function name="main_sample">
    <function-list-args>
      <function-required-arg name="STAXParentID"/>
    </function-list-args>
    <sequence>
      <script>
        CurrentTestPath['group']= 'sample'
        envAlreadyLoaded='true'
      </script>
    <sequence>
      <block name="'sample'">
        <sequence>
      <!--- Load the job environment for the test group execution -->
      <import machine="STAF_LOCAL_HOSTNAME"
              file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
@@ -44,6 +46,11 @@
           { 'parent' : STAXParentID }
      </call>
      
          <script>
            CurrentTestPath['group']= 'sample'
            envAlreadyLoaded='true'
          </script>
      <!---
        #@TestSuiteName             Sample
        #@TestSuitePurpose          Illustrate how to easily contribute functional tests
@@ -97,6 +104,9 @@
          </iterate>
        </finally>
      </try>
        </sequence>
      </block>
    </sequence>
  </function>
  
opends/tests/staf-tests/functional-tests/testcases/setup/directory_manager.xml
@@ -449,44 +449,30 @@
          </call>
          <script>
            ldifDir = '%s/ldif' % (DM_I1_ROOT)
            ldifFile = '%s' % DM_O1_LDIF
            ldifNewFile = '%s/ldif/dm-o1.ldif' % (DM_I1_ROOT)
          </script>
          
          <call function="'runSTAFCommand'">
            { 'name'      :  'Copy LDIF file in I1',
              'location'  :  STAF_REMOTE_HOSTNAME,
              'service'   :  'FS',
              'request'   :  'COPY',
              'arguments' :  'FILE %s TODIRECTORY %s' % (ldifFile, ldifDir)
            }
          </call>
          <call function="'checktestRC'">
            { 'returncode' : RC,
              'expected'   : 0,
              'result'     : 'FAIL to copy LDIF file for I1',
          <message>'Copy LDIF file in I1'</message>
          <call function="'copyFile'">
            { 'location'   : STAF_REMOTE_HOSTNAME,
              'srcfile'    : ldifFile,
              'destfile'   : ldifNewFile,
              'remotehost' : STAF_REMOTE_HOSTNAME
            }
          </call>
          
          <script>
            ldifDir = '%s/ldif' % (DM_I2_ROOT)
            ldifFile = '%s' % DM_O1_LDIF
            ldifNewFile = '%s/ldif/dm-o1.ldif' % (DM_I2_ROOT)
          </script>
          
          <call function="'runSTAFCommand'">
            { 'name'      :  'Copy LDIF file in I2',
              'location'  :  STAF_REMOTE_HOSTNAME,
              'service'   :  'FS',
              'request'   :  'COPY',
              'arguments' :  'FILE %s TODIRECTORY %s' % (ldifFile, ldifDir)
            }
          </call>
          <call function="'checktestRC'">
            { 'returncode' : RC,
              'expected'   : 0,
              'result'     : 'FAIL to copy LDIF file for I2',
          <message>'Copy LDIF file in I2'</message>
          <call function="'copyFile'">
            { 'location'   : STAF_REMOTE_HOSTNAME,
              'srcfile'    : ldifFile,
              'destfile'   : ldifNewFile,
              'remotehost' : STAF_REMOTE_HOSTNAME
            }
          </call>
@@ -567,41 +553,83 @@
          </call>
          <call function="'checkFileExists'">
            { 'file' : '%s/bak' % DM_I1_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : '%s/bak' % DM_I1_ROOT
            }
          </call>
          <call function="'checkFileExists'">
            { 'file' : '%s/ldif' % DM_I1_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : '%s/ldif' % DM_I1_ROOT
            }
          </call>
          <call function="'checkFileNotExists'">
            { 'file' : '%s/bin' % DM_I1_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : '%s/bin' % DM_I1_ROOT
            }
          </call>
          <call function="'checkFileNotExists'">
            { 'file' : '%s/config' % DM_I1_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : '%s/config' % DM_I1_ROOT
            }
          </call>
          <call function="'checkFileNotExists'">
            { 'file' : '%s/db' % DM_I1_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : '%s/db' % DM_I1_ROOT
            }
          </call>
          <call function="'checkFileNotExists'">
            { 'file' : '%s/logs' % DM_I1_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : '%s/logs' % DM_I1_ROOT
            }
          </call>
          <call function="'checkFileNotExists'">
            { 'file' : '%s/bak' % DM_I2_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file' : '%s/bak' % DM_I2_ROOT
            }
          </call>
          <call function="'checkFileNotExists'">
            { 'file' : '%s/ldif' % DM_I2_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file' : '%s/ldif' % DM_I2_ROOT
            }
          </call>
          <script>
            if is_windows_platform(STAF_REMOTE_HOSTNAME):
              subDir='bat'
            else:
              subDir='bin'
          </script>
          <call function="'checkFileExists'">
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file' : '%s/%s' % (DM_I2_ROOT, subDir)
            }
          </call>
          <call function="'checkFileExists'">
            { 'file' : '%s/bin' % DM_I2_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file' : '%s/config' % DM_I2_ROOT
            }
          </call>
          <call function="'checkFileExists'">
            { 'file' : '%s/config' % DM_I2_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file' : '%s/db' % DM_I2_ROOT
            }
          </call>
          <call function="'checkFileExists'">
            { 'file' : '%s/db' % DM_I2_ROOT }
          </call>
          <call function="'checkFileExists'">
            { 'file' : '%s/logs' % DM_I2_ROOT }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file' : '%s/logs' % DM_I2_ROOT
            }
          </call>
opends/tests/staf-tests/functional-tests/testcases/setup/import.xml
@@ -480,6 +480,12 @@
            }
          </call>
          <script>
            nb = len(STAFResult)
            ct = (STAFResult[0] == 'lib')
            a = ' '
          </script>
          <call function="'checktestRC'">
            { 'returncode' : RC,
              'expected'   : 0,
@@ -487,12 +493,6 @@
            }
          </call>
          <script>
            nb = len(STAFResult)
            ct = (STAFResult[0] == 'lib')
            a = ' '
          </script>
          <call function="'checktestRC'">
            { 'returncode' : nb,
              'result'     : a,
opends/tests/staf-tests/functional-tests/testcases/setup/ports.xml
@@ -53,18 +53,13 @@
      <call function="'testSuite_Preamble'"/>
      <script>
        STAF_PORT = 6500
      </script>
      <call function="'getFreePort'">
        {
          'host'  : STAF_REMOTE_HOSTNAME,
          'port'  : 3000,
          'port'  : 2000,
        }
      </call>
      <script>FREE_PORT_1 = STAXResult</script>
      <script>PORTS_I1_PORT = STAXResult</script>
      <call function="'getFreePort'">
        {
@@ -72,12 +67,102 @@
          'port'  : 4000,
        }
      </call>
      <script>FREE_PORT_2 = STAXResult</script>
      <script>PORTS_I1_ADMIN_PORT = STAXResult</script>
      <call function="'getFreePort'">
        {
          'host'  : STAF_REMOTE_HOSTNAME,
          'port'  : 3000,
        }
      </call>
      <script>PORTS_I2_PORT = STAXResult</script>
      <message>
        'Got 2 free ports: %s and %s' % (FREE_PORT_1, FREE_PORT_2)
        'Got 3 free ports: %s, %s and %s' \
        % (PORTS_I1_PORT, PORTS_I1_ADMIN_PORT, PORTS_I2_PORT)
      </message>
      
      <!--- Test Case information
        #@TestMarker          Setup-Uninstall ports Tests
        #@TestName            Setup-Uninstall: Ports:
                              bind-port
        #@TestID              bind-port
        #@TestPurpose         Setup a first instance to bind a port
        #@TestPreamble
        #@TestStep            Setup a first instance to bind a port
        #@TestPostamble
        #@TestResult          PASS if all steps ran without errors
      -->
      <testcase name="getTestCaseName('bind-port')">
        <sequence>
          <call function="'testCase_Preamble'"/>
          <message>'Ports: Setup a first instance to bind a port'</message>
          <script>
            PORTS_I1_BASE = '%s/port_i1' % (OUT_GROUP)
            PORTS_I1_ROOT = '%s/%s' % (PORTS_I1_BASE, OPENDSNAME)
          </script>
          <message>'Prepare Open DS ZIP (in %s)' % PORTS_I1_ROOT</message>
          <call function="'runSTAFCommand'">
            { 'name'      :  'Create directory to contain I1',
              'location'  :  STAF_REMOTE_HOSTNAME,
              'service'   :  'FS',
              'request'   :  'CREATE',
              'arguments' :  'DIRECTORY %s FAILIFEXISTS' % PORTS_I1_BASE
            }
          </call>
          <call function="'checktestRC'">
            { 'returncode' : RC,
              'expected'   : 0,
              'result'     : 'FAIL to create directory',
            }
          </call>
          <call function="'runSTAFCommand'">
            { 'name'      :  'Extract OpenDS ZIP file',
              'location'  :  STAF_REMOTE_HOSTNAME,
              'service'   :  'ZIP',
              'request'   :  'UNZIP',
              'arguments' :  'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
                % (DIRECTORY_INSTANCE_DIR, ZIPNAME, PORTS_I1_BASE)
            }
          </call>
          <call function="'checktestRC'">
            { 'returncode' : RC,
              'expected'   : 0,
              'result'     : 'FAIL to unzip OpenDS ZIP file',
            }
          </call>
          <script>
            c = '%s/setup%s' % (PORTS_I1_ROOT, fileExt)
            p = []
            p.append('--cli --no-prompt --rootUserPassword kangourou')
            p.append('--ldapPort %s' % PORTS_I1_PORT)
            p.append('--adminConnectorPort %s' % PORTS_I1_ADMIN_PORT)
            p = ' '.join(p)
          </script>
          <message>'%s %s' % (c, p)</message>
          <call function="'runCommand'">
            { 'location'  : STAF_REMOTE_HOSTNAME,
              'name'      : 'Setup a first instance to bind a port',
              'command'   : c,
              'arguments' : p,
              'path'      : PORTS_I1_ROOT,
              'expectedRC': 0,
              'outputFile': '%s/ports-install-i1.txt' % OUT_GROUP,
            }
          </call>
          <call function="'testCase_Postamble'"/>
        </sequence>
      </testcase>
      
      <!--- Test Case information
        #@TestMarker          Setup-Uninstall ports Tests
@@ -101,7 +186,7 @@
            c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
            p = []
            p.append('--cli --no-prompt --rootUserPassword kangourou')
            p.append('--ldapPort %s' % STAF_PORT)
            p.append('--ldapPort %s' % PORTS_I1_PORT)
            p = ' '.join(p)
          </script>
      
@@ -144,8 +229,8 @@
            c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
            p = []
            p.append('--cli --no-prompt --rootUserPassword kangourou')
            p.append('--ldapPort %s' % FREE_PORT_1)
            p.append('--ldapsPort %s' % STAF_PORT)
            p.append('--ldapPort %s' % PORTS_I2_PORT)
            p.append('--ldapsPort %s' % PORTS_I1_PORT)
            p.append('--generateSelfSignedCertificate')
            p = ' '.join(p)
          </script>
@@ -188,8 +273,8 @@
            c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
            p = []
            p.append('--cli --no-prompt --rootUserPassword kangourou')
            p.append('--ldapPort %s' % FREE_PORT_1)
            p.append('--jmxPort %s' % STAF_PORT)
            p.append('--ldapPort %s' % PORTS_I2_PORT)
            p.append('--jmxPort %s' % PORTS_I1_PORT)
            p = ' '.join(p)
          </script>
    
@@ -227,8 +312,8 @@
        <sequence>
          
          <script>
            PORTS_I1_BASE = '%s/ports_i1' % (OUT_GROUP)
            PORTS_I1_ROOT = '%s/%s' % (PORTS_I1_BASE, OPENDSNAME)
            PORTS_I2_BASE = '%s/ports_i2' % (OUT_GROUP)
            PORTS_I2_ROOT = '%s/%s' % (PORTS_I2_BASE, OPENDSNAME)
          </script>
          
          
@@ -239,11 +324,11 @@
          <message>'Prepare Open DS ZIP (in %s)' % PORTS_I1_ROOT</message>
          <call function="'runSTAFCommand'">
            { 'name'      :  'Create directory to contain I1',
            { 'name'      :  'Create directory to contain I2',
              'location'  :  STAF_REMOTE_HOSTNAME,
              'service'   :  'FS',
              'request'   :  'CREATE',
              'arguments' :  'DIRECTORY %s FAILIFEXISTS' % PORTS_I1_BASE
              'arguments' :  'DIRECTORY %s FAILIFEXISTS' % PORTS_I2_BASE
            }
          </call>
@@ -260,7 +345,7 @@
              'service'   :  'ZIP',
              'request'   :  'UNZIP',
              'arguments' :  'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
                % (DIRECTORY_INSTANCE_DIR, ZIPNAME, PORTS_I1_BASE)
                % (DIRECTORY_INSTANCE_DIR, ZIPNAME, PORTS_I2_BASE)
            }
          </call>
@@ -272,9 +357,9 @@
          </call>
          <script>
            c = '%s/setup%s' % (PORTS_I1_ROOT, fileExt)
            c = '%s/setup%s' % (PORTS_I2_ROOT, fileExt)
            p = []
            p.append('--cli --no-prompt --ldapPort %s' % (STAF_PORT))
            p.append('--cli --no-prompt --ldapPort %s' % PORTS_I1_PORT)
            p.append('--rootUserPassword "kangourou"')
            p.append('--skipPortCheck --doNotStart --noPropertiesFile')
            p = ' '.join(p)
@@ -283,17 +368,17 @@
          <message>'%s %s' % (c, p)</message>
          <call function="'runCommand'">
            { 'location'  : STAF_REMOTE_HOSTNAME,
              'name'      : 'Setup command for I1 (port conflict but nocheck)',
              'name'      : 'Setup command for I2 (port conflict but nocheck)',
              'command'   : c,
              'arguments' : p,
              'path'      : PORTS_I1_ROOT,
              'expectedRC': 0,
              'outputFile': '%s/ports-setup-confl-nocheck-i1.txt' % OUT_GROUP,
              'outputFile': '%s/ports-setup-confl-nocheck-i2.txt' % OUT_GROUP,
            }
          </call>
          <script>
            c = '%s/%s/start-ds%s' % (PORTS_I1_ROOT, fileFolder, fileExt)
            c = '%s/%s/start-ds%s' % (PORTS_I2_ROOT, fileFolder, fileExt)
            p = []
            p = ' '.join(p)
          </script>
@@ -304,14 +389,14 @@
              'name'      : 'start DS (will raise port conflict)',
              'command'   : c,
              'arguments' : p,
              'path'      : PORTS_I1_ROOT,
              'path'      : PORTS_I2_ROOT,
              'expectedRC': 1,
              'outputFile': '%s/ports-start-conflict-i1.txt' % OUT_GROUP,
              'outputFile': '%s/ports-start-conflict-i2.txt' % OUT_GROUP,
            }
          </call>
          
          <script>
            c = '%s/uninstall%s' % (PORTS_I1_ROOT, fileExt)
            c = '%s/uninstall%s' % (PORTS_I2_ROOT, fileExt)
            p = []
            p.append('--cli --no-prompt')
            p.append('--quiet --forceOnError --remove-all')
@@ -322,12 +407,12 @@
          <message>'%s %s' % (c, p)</message>
          <call function="'runCommand'">
            { 'location'  : STAF_REMOTE_HOSTNAME,
              'name'      : 'Uninstall I1',
              'name'      : 'Uninstall I2',
              'command'   : c,
              'arguments' : p,
              'path'      : PORTS_I1_ROOT,
              'expectedRC': 0,
              'outputFile': '%s/ports-uninstall-conflict-i1.txt' % OUT_GROUP,
              'outputFile': '%s/ports-uninstall-conflict-i2.txt' % OUT_GROUP,
            }
          </call>
          <call function="'testCase_Postamble'"/>
@@ -355,6 +440,16 @@
          <call function="'testCase_Preamble'"/>
          <message>'Ports: Unauthorized LDAP port'</message>
          
          <!-- This testcase is not relevant on Windows -->
          <script>
            if is_windows_platform(STAF_REMOTE_HOSTNAME):
              skip=1
            else:
              skip=0
          </script>
          <if expr="skip == 0">
            <sequence>
          <script>
            c = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
            p = []
@@ -374,27 +469,61 @@
              'outputFile': '%s/ports-unauthorized-ldap.txt' % OUT_GROUP,
            }
          </call>
          <!--- Temporary fix to avoid remaning processes
                when this testcase fails -->
          <script>
            cmd = '%s/%s/%s/stop-ds%s' \
                  % (ODS_UNZIPPED, OPENDSNAME, fileFolder, fileExt)
          </script>
          <if expr="os.path.exists(cmd)" >
            </sequence>
            <else>
            <sequence>
              <message>'Stop instance'</message>
              <call function="'StopDsWithScript'">
                <message>'This testcase is not relevant on Windows'</message>
                <tcstatus result="'pass'"/>
              </sequence>
            </else>
          </if>
          <call function="'testCase_Postamble'"/>
        </sequence>
      </testcase>
      <!--- Test Case information
        #@TestMarker          Setup-Uninstall ports Tests
        #@TestName            Setup-Uninstall: Ports:
                              uninstall
        #@TestID              uninstall
        #@TestPurpose         Uninstall the first instance
        #@TestPreamble
        #@TestStep            Uninstall the first instance
        #@TestPostamble
        #@TestResult          PASS if all steps ran without errors
      -->
      <testcase name="getTestCaseName('uninstall')">
        <sequence>
          <call function="'testCase_Preamble'"/>
          <message>'Ports: Uninstall the first instance'</message>
          <script>
            PORTS_I1_BASE = '%s/port_i1' % (OUT_GROUP)
            PORTS_I1_ROOT = '%s/%s' % (PORTS_I1_BASE, OPENDSNAME)
          </script>
          <script>
            c = '%s/uninstall%s' % (PORTS_I1_ROOT, fileExt)
            p = []
            p.append('--cli --no-prompt')
            p.append('--quiet --forceOnError --remove-all')
            p.append('--referencedHostName %s' % STAF_REMOTE_HOSTNAME)
            p = ' '.join(p)
          </script>
          <message>'%s %s' % (c, p)</message>
          <call function="'runCommand'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                'dsPath'      : '%s/%s' % (ODS_UNZIPPED, OPENDSNAME),
                'dsAdminPort' : 1,
                'dsBindDN'    : 'cn=Directory Manager' ,
                'dsBindPwd'   : 'kangourou' ,
                'expectedRC'  : 'noCheck'
              'name'      : 'Uninstall I1',
              'command'   : c,
              'arguments' : p,
              'path'      : PORTS_I1_ROOT,
              'expectedRC': 0,
              'outputFile': '%s/ports-uninstall-i1.txt' % OUT_GROUP,
                }
              </call>
            </sequence>
          </if>
          <call function="'testCase_Postamble'"/>
        </sequence>
opends/tests/staf-tests/functional-tests/testcases/setup/security.xml
@@ -155,7 +155,7 @@
            DM_PW = 'secret12'
            DM_PW_FILE = '%s/setup/pwd-security.ldif' % remote.data
            KEYTOOL = '%s/bin/keytool%s' % (JAVA_HOME, fileExt)
            KEYTOOL = '%s/bin/keytool' % (JAVA_HOME)
            SEC_I1_BASE = '%s/sec_i1' % (OUT_GROUP)
            SEC_I1_ROOT = '%s/%s' % (SEC_I1_BASE, OPENDSNAME)
            SEC_I2_BASE = '%s/sec_i2' % (OUT_GROUP)
@@ -165,7 +165,10 @@
          </script>
          <call function="'checkFileExists'">
            { 'file' : KEYTOOL }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : KEYTOOL
            }
          </call>
          <!-- 1.1. Setup I1 -->
@@ -268,7 +271,10 @@
          </script>
          <call function="'checkFileExists'">
            { 'file' : ks }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : ks
            }
          </call>
          <!-- 1.4. Check StartTLS non-enablement -->
@@ -326,7 +332,7 @@
              'service'   :  'ZIP',
              'request'   :  'UNZIP',
              'arguments' :  'ZIPFILE %s/%s TODIRECTORY %s RESTOREPERMISSION' \
                % (ZIPPATH, ZIPNAME, SEC_I2_BASE)
                % (DIRECTORY_INSTANCE_DIR, ZIPNAME, SEC_I2_BASE)
            }
          </call>
@@ -403,7 +409,10 @@
          </script>
          <call function="'checkFileExists'">
            { 'file' : ks }
            {
            'location' : STAF_REMOTE_HOSTNAME,
            'file'     : ks
            }
          </call>
          <!-- 2.4. Check StartTLS enablement -->
@@ -852,33 +861,7 @@
            }
          </call>
          
          <!-- 6.1. Uninstall I1 (should fail: incompatible options) -->
          <message>'++ Uninstall I1 (should fail)'</message>
          <script>
            c = '%s/uninstall%s' % (SEC_I1_ROOT, fileExt)
            p = []
            p.append('--cli --no-prompt')
            p.append('--adminUID admin --bindPassword %s' % DM_PW)
            p.append('--remove-all')
            p.append('--trustStorePath %s' % MY_KEYSTORE)
            p.append('--trustStorePassword secret12')
            p = ' '.join(p)
          </script>
          <message>'%s %s' % (c, p)</message>
          <call function="'runCommand'">
            { 'location'  : STAF_REMOTE_HOSTNAME,
              'name'      : 'Uninstall I1',
              'command'   : c,
              'arguments' : p,
              'path'      : SEC_I1_ROOT,
              'expectedRC': 2,
              'outputFile': '%s/sec-uninstall1-i1.txt' % OUT_GROUP,
            }
          </call>
          <!-- 6.2. Uninstall I1 -->
          <!-- 6.1. Uninstall I1 -->
          <message>'++ Uninstall I1'</message> 
          <script>
            c = '%s/uninstall%s' % (SEC_I1_ROOT, fileExt)
@@ -903,33 +886,12 @@
            }
          </call>
          <!--- Temporary fix to avoid remaning processes
                when this testcase fails -->
          <script>
            cmd = '%s/%s/%s/stop-ds%s' \
            % (ODS_UNZIPPED, OPENDSNAME, fileFolder, fileExt)
          </script>
          <if expr="os.path.exists(cmd)" >
            <sequence>
              <message>'Stop I1'</message>
              <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                'dsPath'      : SEC_I1_ROOT,
                'dsAdminPort' : SEC_I1_ADMIN_PORT,
                'dsBindDN'    : DM_DN ,
                'dsBindPwd'   : DM_PW ,
                'expectedRC'  : 'noCheck'
                }
              </call>
            </sequence>
          </if>
          <!-- 6.3. Uninstall I2 -->
          <!-- 6.2. Uninstall I2 -->
          <message>'++ Uninstall I2'</message> 
          <script>
            c = '%s/uninstall%s' % (SEC_I2_ROOT, fileExt)
            p = []
            p.append('--cli --no-prompt')
            p.append('--cli --no-prompt --trustAll')
            p.append('--adminUID admin --bindPasswordFile %s' % DM_PW_FILE)
            p.append('--remove-all')
            p = ' '.join(p)
@@ -947,27 +909,6 @@
            }
          </call>
          <!--- Temporary fix to avoid remaning processes
                when this testcase fails -->
          <script>
            cmd = '%s/%s/%s/stop-ds%s' \
            % (ODS_UNZIPPED, OPENDSNAME, fileFolder, fileExt)
          </script>
          <if expr="os.path.exists(cmd)" >
            <sequence>
              <message>'Stop I2'</message>
              <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                'dsPath'      : SEC_I2_ROOT,
                'dsAdminPort' : SEC_I2_ADMIN_PORT,
                'dsBindDN'    : DM_DN ,
                'dsBindPwd'   : DM_PW ,
                'expectedRC'  : 'noCheck'
                }
              </call>
            </sequence>
          </if>
          <call function="'testCase_Postamble'"/>
        </sequence>
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp.xml
@@ -30,6 +30,7 @@
  <defaultcall function="main_snmp"/>
  <function name="main_snmp" scope="local">
    <function-list-args>
      <function-required-arg name="STAXParentID"/>
    </function-list-args>
@@ -40,8 +41,6 @@
        <sequence>
          <message log="1" level="'Info'">'STAXParentID= %s' % STAXParentID</message>
          <!--- Load the job environment for the test group execution -->
          <import machine="STAF_LOCAL_HOSTNAME"
                  file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_mibvalues.xml
@@ -110,18 +110,16 @@
                                         % SNMP_PORT)
                indexLDAP = get_handler_index(DEFAULT_VALUES, '1.3.6.1.27.3.%s'\
                                         % DIRECTORY_INSTANCE_PORT)
                indexLDIF = get_handler_index(DEFAULT_VALUES, '1.3.6.1.4.1.42')
              </script>
              <if expr="nbHandler == 3 and indexSNMP != 0 and indexLDAP != 0 and indexLDIF != 0">
              <if expr="nbHandler == 2 and indexSNMP != 0 and indexLDAP != 0">
                <sequence>
                  <script>
                    msg1 = 'The connection handlers info are correct.\n'
                    msg2 = 'number of hanlder: %s\n' % nbHandler
                    msg3 = 'index SNMP hanlder: %s\n' % indexSNMP
                    msg4 = 'index LDAP hanlder: %s\n' % indexLDAP
                    msg5 = 'index LDIF hanlder: %s\n' % indexLDIF
                    msg = '%s%s%s%s%s' % (msg1, msg2, msg3, msg4, msg5)
                    msg = '%s%s%s%s' % (msg1, msg2, msg3, msg4)
                  </script>
                  <message>
                    '%s' % msg
@@ -135,8 +133,7 @@
                      msg2 = 'number of hanlder: %s/3\n' % nbHandler
                      msg3 = 'index SNMP hanlder: %s\n' % indexSNMP
                      msg4 = 'index LDAP hanlder: %s\n' % indexLDAP
                      msg5 = 'index LDIF hanlder: %s' % indexLDIF
                      msg = '%s%s%s%s%s' % (msg1, msg2, msg3, msg4, msg5)
                      msg = '%s%s%s%s' % (msg1, msg2, msg3, msg4)
                    </script>
                    <message>
                      '%s' % msg
@@ -173,14 +170,36 @@
                'snmp_mibvalues: check value of dsServerType entry'
              </message>
              <!-- Get the information about the server -->
              <call function="'GetVar'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'type'      : 'shared',
                  'variable'  : 'Job%s_ServerInfo' % STAXParentID
                }
              </call>
              <if expr="RC != 0">
              <script>
                dsServerType = DEFAULT_VALUES['dsServerType.1']
                version = DSInfo.ServerDict['server version']
                dsVersion = DSInfo.getServerVersion(version)
                build = DSInfo.ServerDict['server buildid']
                dsBuild = DSInfo.getServerBuildId(build)
                  STAFResult='{}'
                </script>
              </if>
              <script>
                jobInfo=eval(STAFResult)
                if jobInfo.has_key('%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)):
                  serverInformation=jobInfo['%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)]
                  dsVersion=serverInformation['server version']
                  dsBuild=serverInformation['server buildid']
                else:
                  dsVersion='unknown'
                  dsBuild='unknown'
                dsServer = 'OpenDS Directory Server %s - %s' \
                           % (dsVersion.rstrip(), dsBuild)
                dsServerType = DEFAULT_VALUES['dsServerType.1']
              </script>
              <if expr="dsServerType == dsServer">
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_status.xml
@@ -687,6 +687,16 @@
              <call function="'testCase_Preamble'"/>
              <!-- This testcase is not relevant on Windows -->
              <script>
                if is_windows_platform(STAF_REMOTE_HOSTNAME):
                  skip=1
                else:
                  skip=0
              </script>
              <if expr="skip == 0">
                <sequence>
              <message>
                'status: set the listen-port to a wrong value'
              </message>
@@ -734,9 +744,9 @@
              </call>
              <script>
                msg1 = 'An unexpected error occurred while trying to initialize'
                msg2 = 'the SNMP Connection Handler. Please check the'
                msg3 = 'configuration attributes'
                    msg1 = 'An unexpected error occurred while trying to'
                    msg2 = 'initialize the SNMP Connection Handler. Please'
                    msg3 = 'check the configuration attributes'
                msg = '%s %s %s' % (msg1, msg2, msg3)
              </script>
@@ -813,6 +823,14 @@
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD
                }
              </call>
                </sequence>
                <else>
                  <sequence>
                    <message>'This testcase is not relevant on Windows'</message>
                    <tcstatus result="'pass'"/>
                  </sequence>
                </else>
              </if>
              <call function="'testCase_Postamble'"/>
opends/tests/staf-tests/shared/ant/build.xml
@@ -79,7 +79,7 @@
        <switch value="${os.arch}">
          <case value="sparc">
            <!-- Solaris sparc -->
            <exec executable="isainfo" output="os.bits">
            <exec executable="isainfo" outputproperty="os.bits">
              <arg value="-b"/>
            </exec>
            <switch value="${os.bits}">
opends/tests/staf-tests/shared/functions/dsadm.xml
@@ -1036,6 +1036,10 @@
          'expectedRC': expectedRC
        }
      </call>
      <return>
        STAXResult
      </return>
    </sequence>
  </function>
@@ -4267,6 +4271,7 @@
            
      <call function="'runCommand'">
        { 'location'  : location,
          'envCmd'     : [ 'LANG=C' , 'LC_ALL=C' ] ,
          'name'      : 'manage-tasks Script',
          'command'   : STAFCmd,
          'arguments' : STAFCmdParams,
opends/tests/staf-tests/shared/functions/environment.xml
@@ -401,6 +401,18 @@
      
      <call function="'initialiseGlobalVariables'"/>
      
      <message>
        'Remove files from previous runs under %s.' % DIRECTORY_INSTANCE_DIR
      </message>
      <call function="'deleteFolder'">
        { 'location'   : STAF_REMOTE_HOSTNAME ,
          'foldername' : DIRECTORY_INSTANCE_DIR }
      </call>
      <call function="'createFolder'">
        { 'location'   : STAF_REMOTE_HOSTNAME ,
          'foldername' : DIRECTORY_INSTANCE_DIR }
      </call>
      <call function="'GetDirectoryServerInformation'"/>
      <!-- Set variables to build unique path to store data -->
opends/tests/staf-tests/shared/functions/ldap.xml
@@ -2715,7 +2715,7 @@
          'command'   : '%s/bin/java' % JAVA_HOME,
          'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
          'location'  : location,
          'env'       : ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME,'CLASSPATH=%s/../%s/ldap' % (dsPath,remote.reljavadir)],
          'envCmd'    : ['CLASSPATH=%s/../%s/ldap' % (dsPath,remote.reljavadir)],
          'path'      : '%s/../%s/ldap' % (dsPath,remote.reljavadir),
          'expectedRC': expectedRC
        }
@@ -2958,7 +2958,7 @@
          'command'   : '%s/bin/java' % JAVA_HOME,
          'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
          'location'  : location,
          'env'       : ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME,'CLASSPATH=%s/../%s/ldap' % (dsPath,remote.reljavadir)],
          'envCmd'    : ['CLASSPATH=%s/../%s/ldap' % (dsPath,remote.reljavadir)],
          'path'      : '%s/../%s/ldap' % (dsPath,remote.reljavadir),
          'expectedRC': expectedRC
        }
@@ -3070,7 +3070,7 @@
          'command'   : '%s/bin/java' % JAVA_HOME,
          'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
          'location'  : location,
          'env'       : ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME,'CLASSPATH=%s/../%s/ldap' % (dsPath,remote.reljavadir)],
          'envCmd'    : ['CLASSPATH=%s/../%s/ldap' % (dsPath,remote.reljavadir)],
          'path'      : '%s/../%s/ldap' % (dsPath,remote.reljavadir),
          'expectedRC': expectedRC
        }
opends/tests/staf-tests/shared/functions/snmp.xml
@@ -191,7 +191,7 @@
        'arguments'  : '%s %s' % (STAFCmd, STAFCmdParams) ,
        'location'   : location ,
        'path'       : '%s/snmp' % remote.java,
        'env'        : env ,
        'envCmd'     : env ,
        'expectedRC' : expectedRC
        }
      </call>
@@ -359,7 +359,7 @@
        'arguments'  : '%s %s' % (STAFCmd, STAFCmdParams) ,
        'location'   : location ,
        'path'       : '%s/snmp' % remote.java,
        'env'        : env ,
        'envCmd'     : env ,
        'expectedRC' : expectedRC
        }
      </call>
@@ -434,7 +434,7 @@
      </call>
      <script>
        if is_windows_platform(location):
          jstaf_jarfile='%s\\bin\\JSTAF.jar' % STAFResult
          jstaf_jarfile='%s\bin\JSTAF.jar' % STAFResult
        else:
          jstaf_jarfile='%s/lib/JSTAF.jar' % STAFResult
      </script>
@@ -485,7 +485,7 @@
        'arguments'  : '%s %s' % (STAFCmd, STAFCmdParams) ,
        'location'   : location ,
        'path'       : snmpPath ,
        'env'        : env ,
        'envCmd'     : env ,
        'outputFile' : outputFile ,
        'expectedRC' : expectedRC
        }
opends/tests/staf-tests/shared/functions/utils.xml
@@ -1534,8 +1534,9 @@
          the path where the command is to be found
        </function-arg-description>
      </function-arg-def>
      <function-arg-def name="env"
                        type="optional">
      <function-arg-def name="envCmd"
                        type="optional"
                        default="''">
        <function-arg-description>
          the environment variables to set. The default set here should just
          work for OpenDS commands
@@ -1615,11 +1616,15 @@
        random.seed(java.util.Date().getTime())
        _id = '%s#%d' % (strftime('%Y-%m-%d %H:%M:%S',localtime()),random.randint(0,999))
        
        if not env:
        env=[]
        for item in envCmd:
          env.append('%s' % item)
          if is_windows_platform(location):
            env=['PATH=C:\Windows;C:\Windows\system32;%s' % path, 'JAVA_HOME=%s' % JAVA_HOME]
          env.append('PATH=C:\Windows;C:\Windows\system32;%s' % path)
          env.append('JAVA_HOME=%s' % JAVA_HOME)
          else:
            env=['PATH=/bin:/usr/bin:%s' % path, 'JAVA_HOME=%s' % JAVA_HOME]
          env.append('PATH=/bin:/usr/bin:%s' % path)
          env.append('JAVA_HOME=%s' % JAVA_HOME)
      </script>
      <message>
        '%s: Running command:\n %s %s\nlocation: %s\nenv: %s\nworkdir: %s' % (_id,command,arguments,location,env,path)
@@ -2204,7 +2209,7 @@
            'arguments'  : '-target 1.5 %s' % list ,
            'location'   : location ,
            'path'       : foldername ,
            'env'        : env ,
            'envCmd'     : env ,
            'expectedRC' : expectedRC
            }
          </call>
@@ -2270,6 +2275,14 @@
      Set testcase result to FAIL if file (as param) does not exist
    </function-description>
    <function-map-args>
      <function-arg-def name="location"
                        type="optional"
                        default="STAXServiceMachine">
        <function-arg-description>
          Location of target host
        </function-arg-description>
        <function-arg-property name="type" value="hostname"/>
      </function-arg-def>
      <function-arg-def name="file" type="required">
        <function-arg-description>
          The file to check existence
@@ -2277,14 +2290,20 @@
      </function-arg-def>
    </function-map-args>
    <sequence>
      <script>
        if os.path.exists('%s' % file):
          exist=1
        else:
          exist=0
      </script>
      <if expr="exist == 0">
      <call function="'GetEntry'">
        {
        'location'  : STAF_REMOTE_HOSTNAME ,
        'entry'     : file ,
        'attribute' : 'TYPE'
        }
      </call>
      <if expr="RC == 48">
        <sequence>
        <tcstatus result="'fail'"/>
          <message log="1" level="'Error'">
            'ERROR :  File %s does not exist' % file
          </message>
        </sequence>
      </if>
    </sequence>
  </function>
@@ -2294,6 +2313,14 @@
      Set testcase result to FAIL if file (as param) exists
    </function-description>
    <function-map-args>
      <function-arg-def name="location"
                        type="optional"
                        default="STAXServiceMachine">
        <function-arg-description>
          Location of target host
        </function-arg-description>
        <function-arg-property name="type" value="hostname"/>
      </function-arg-def>
      <function-arg-def name="file" type="required">
        <function-arg-description>
          The file to check absence
@@ -2301,14 +2328,20 @@
      </function-arg-def>
    </function-map-args>
    <sequence>
      <script>
        if os.path.exists('%s' % file):
          exist=1
        else:
          exist=0
      </script>
      <if expr="exist == 1">
      <call function="'GetEntry'">
        {
        'location'  : STAF_REMOTE_HOSTNAME ,
        'entry'     : file ,
        'attribute' : 'TYPE'
        }
      </call>
      <if expr="RC != 48">
        <sequence>
        <tcstatus result="'fail'"/>
          <message log="1" level="'Error'">
            'ERROR :  File %s does not exist' % file
          </message>
        </sequence>
      </if>
    </sequence>
  </function>
opends/tests/staf-tests/shared/functions/webcontainer.xml
@@ -292,7 +292,7 @@
      <call function="'runCommand'">
        { 'location' : location,
        'command'    : STAFCmd,
        'env'        : STAFCmdEnv,
        'envCmd'     : STAFCmdEnv,
        'name'       : STAFCmd,
        'path'       : wcBinPath
        }
@@ -347,7 +347,7 @@
      <call function="'runCommand'">
        { 'location' : location,
        'command'    : STAFCmd,
        'env'        : STAFCmdEnv,
        'envCmd'     : STAFCmdEnv,
        'name'       : STAFCmd,
        'path'       : wcBinPath,
        'expectedRC' : expectedRC