LDAS System Test

This page describes how to run the system test harness included in the ldas build. All tests are expected to pass.
  1. Login as user ldas to gateway host containing the build e.g. ldas-dev gateway.
  2. cd /ldas/testbin
    
    SystemTest.sh*     dbntuple.tcl*       dc2frame.test*     fracc6.tcl*         putStandAlone.tcl*
    SystemTest.tcl*    dbperformance.tcl*  dcmean.tcl*        frgap.tcl*          rundb2cmds.tcl*
    complex_data.tcl*  dbqchannel.tcl*     descMetaData.tcl*  frtest.tcl*
    compresstest.tcl*  dbquery.tcl*        dtcheck.tcl*       geotest.tcl*
    dbException.tcl*   dbspectrum.tcl*     fracc.tcl*         procReadWrite.tcl* 
  3. Help for each test can be view by using -help option, e.g. for dbntuple.tcl
    dbntuple.tcl -help
    TCLSH: /ldcg/bin/64/tclsh WISH: /ldcg/bin/64/wish LIGOTOOLS: argc: 1 args: -help
    Usage: tclsh script ?-help? ?flag value? ...
    Available flags (and valid input values) are:
      -help                          Display this usage information.
      --base value                   specifies the base port of the LDAS
                                     system  (default: [])
      --code value                   command to be executed  (default: [])
      --data-output-dir value        Specifies directory to be used for data
                                     files intended to be kept  (default: []
                                     )
      --email value                  specifies the email address for
                                     responces  (default: [])
      --enable-globus value          Specifies if globus should be used (0
                                     or 1)  (default: [])
      --enable-gsi value             Specifies if gsi enscryption should be
                                     used (0 or 1)  (default: [])
      --host value                   specifies the host of the managerAPI  (
                                     default: [])
      --ifo value                    specifies the IFO  (default: [])
      --manager-reply-timeout value  timeout secs for job if LDASJobH does
                                     not hear from manager  (default: [])
      --pass value                   ??? :TODO: Document this option  (
                                     default: [])
      --port value                   managerAPI port to be used for
                                     communication  (default: [])
      --qa-debug-auto-flush value    Boolean controlling if debugging
                                     information is immediately flushed  (
                                     default: [])
      --qa-debug-level value         Level of debugging output  (default: []
                                     )
      --site value                   specifies the site of the managerAPI  (
                                     default: [])
      --tmp-dir value                Specifies directory to be used for
                                     temporary files  (default: [])
      --top-dir value                Specifies top directory for LDAS
                                     configuration  (default: [])
      --user value                   execute the commands as the specified
                                     user  (default: [])
      -P value                       managerAPI port to be used for
                                     communication  (default: [])
      -asidefromdir pattern          Skip tests in directories that match
                                     the glob pattern given.  (default: [])
      -b value                       specifies the base port of the LDAS
                                     system  (default: [])
      -c value                       command to be executed  (default: [])
      -constraints list              Do not skip the listed constraints
                                     listed in -constraints.  (default: [])
      -debug level                   Internal debug level  (default: [0])
      -e value                       specifies the email address for
                                     responces  (default: [])
      -errfile file                  Send errors from test runs to the
                                     specified file.  (default: [stderr])
      -file pattern                  Run tests in all test files that match
                                     the glob pattern given.  (default: [*.
                                     test])
      -h value                       specifies the host of the managerAPI  (
                                     default: [])
      -i value                       specifies the IFO  (default: [])
      -limitconstraints boolean      whether to run only tests with the
                                     constraints  (default: [0])
      -load script                   Specifies the script to load the tested
                                     commands.  (default: [])
      -loadfile file                 Read the script to load the tested
                                     commands from the specified file.  (
                                     default: [])
      -match list                    Run all tests within the specified
                                     files that match one of the list of
                                     glob patterns given.  (default: [*])
      -notfile pattern               Skip all test files that match the glob
                                     pattern given.  (default: [l.*.test])
      -outfile file                  Send output from test runs to the
                                     specified file.  (default: [stdout])
      -p value                       ??? :TODO: Document this option  (
                                     default: [])
      -preservecore level            If 2, save any core files produced
                                     during testing in the directory
                                     specified by -tmpdir. If 1, notify the
                                     user if core files are created.  (
                                     default: [0])
      -relateddir pattern            Run tests in directories that match the
                                     glob pattern given.  (default: [*])
      -s value                       specifies the site of the managerAPI  (
                                     default: [])
      -singleproc boolean            whether to run all tests in one process
                                     (default: [0])
      -skip list                     Skip all tests within the specified
                                     tests (via -match) and files that match
                                     one of the list of glob patterns given.
                                     (default: [])
      -testdir directory             Search tests in the specified directory
                                     .  (default: [/export/ldcg_server/
                                     ldas_prod/solaris/stow_pkgs/ldas-1.9.74
                                     -opt/testbin])
      -tmpdir directory              Save temporary files in the specified
                                     directory.  (default: [/export/
                                     ldcg_server/ldas_prod/solaris/stow_pkgs
                                     /ldas-1.9.74-opt/testbin])
      -u value                       execute the commands as the specified
                                     user  (default: [])
      -verbose level                 Takes any combination of the values 'p'
                                     , 's', 'b', 't' and 'e'. Test suite
                                     will display all passed tests if 'p' is
                                     specified, all skipped tests if 's' is
                                     specified, the bodies of failed tests
                                     if 'b' is specified, and when tests
                                     start if 't' is specified. ErrorInfo is
                                     displayed if 'e' is specified.  (
                                     default: [pass skip])
    
    
  4. To start the master test script for all tests, make use of the script /ldas_usr/ldas/test/bin/runsystest to set up the environment and invoke the respective tests. /ldas_usr/ldas/test/bin is a path in user ldas environment and also mounted from tandems so enter
    runsystest <site> <test> &
    e.g. runsystest dev SystemTest &
    is equivalent to 
    /usr/bin/env X509_CERT_DIR=/etc/grid-security/certificates /ldas/testbin/SystemTest.tcl --site dev 
    -debug 0 -verbose lpse --enable-globus 1 --enable-gsi 1 
    --qa-debug-level 1 --manager-reply-timeout 1200000 --qa-debug-auto-flush 1 -skip \"*wrapper*\" >& SystemTest.log &
  5. Results are output by default to /ldas_outgoing/tmp/SystemTest-<ldas version> e.g. /ldas_outgoing/tmp/SystemTest-1.9.74
    complex_data.log   dbqchannel.log  descMetaData.log  frgap-48.log       putStandAlone.log
    compresstest.log   dbquery.log     dtcheck.log       frgap-80.log       summary_report.txt
    dbException.log    dbspectrum.log  fracc6.log        frtest.log
    dbntuple.log       dc2frame.log    frgap-16.log      geotest.log
    dbperformance.log  dcmean.log      frgap-18.log      procReadWrite.log
  6. The overall test summary is found in file summary_report.txt, e.g.
    Command: ./SystemTest.tcl --site dev -debug 0 -verbose lpse --enable-globus 1 --enable-gsi 1 
    --qa-debug-level 0 
    
    Started:  Fri Sep 28 10:20:31 PDT 2007
    
                    TASK        PID START                 STOP
           procReadWrite          2  2007.09.28.10:20:31   2007.09.28.10:20:54
                 geotest          3  2007.09.28.10:20:31   2007.09.28.10:21:48
                dc2frame          4  2007.09.28.10:20:31   2007.09.28.10:21:05
                  dcmean          5  2007.09.28.10:20:31   2007.09.28.10:21:04
                dbntuple          6  2007.09.28.10:20:31   2007.09.28.10:23:01
              dbqchannel          7  2007.09.28.10:20:31   2007.09.28.10:24:55
                 dbquery          8  2007.09.28.10:20:32   2007.09.28.10:22:35
              dbspectrum          9  2007.09.28.10:20:32   2007.09.28.10:22:08
                frgap-16         10  2007.09.28.10:24:55   2007.09.28.10:57:40
                frgap-18         11  2007.09.28.10:24:55   2007.09.28.10:56:54
                frgap-48         12  2007.09.28.10:24:55   2007.09.28.10:50:21
                frgap-80         13  2007.09.28.10:24:55   2007.09.28.10:50:57
                  fracc6         14  2007.09.28.10:24:56   2007.09.28.10:42:52
                 dtcheck         15  2007.09.28.10:24:56   2007.09.28.10:32:42
            descMetaData         16  2007.09.28.10:24:56   2007.09.28.10:26:49
             dbException         17  2007.09.28.10:26:49   2007.09.28.10:34:10
                  frtest         18  2007.09.28.10:32:42   2007.09.28.10:52:40
           putStandAlone         19  2007.09.28.10:34:10   2007.09.28.10:41:49
            compresstest         20  2007.09.28.10:42:53   2007.09.28.10:52:42
            complex_data         21  2007.09.28.10:52:40   2007.09.28.10:54:22
           dbperformance         22  2007.09.28.10:57:40   2007.09.28.14:14:09
    
                     LOG:   TOTAL    PASS    SKIP    FAIL  WALL TIME
        complex_data.log:      10      10       0       0   00:01:42
        compresstest.log:      36      36       0       0   00:09:49
         dbException.log:      33      33       0       0   00:07:21
            dbntuple.log:      15      15       0       0   00:02:30
       dbperformance.log:     504     500       0       4   03:16:29
          dbqchannel.log:      28      28       0       0   00:04:24
             dbquery.log:      12      12       0       0   00:02:03
          dbspectrum.log:       8       8       0       0   00:01:36
            dc2frame.log:       3       3       0       0   00:00:34
              dcmean.log:       2       2       0       0   00:00:33
        descMetaData.log:      16      16       0       0   00:01:53
             dtcheck.log:     124     124       0       0   00:07:46
              fracc6.log:     217     179      38       0   00:17:56
            frgap-16.log:     245     245       0       0   00:32:45
            frgap-18.log:     235     235       0       0   00:31:59
            frgap-48.log:     165     165       0       0   00:25:26
            frgap-80.log:     165     165       0       0   00:26:02
              frtest.log:     189     189       0       0   00:19:58
             geotest.log:      11      11       0       0   00:01:17
       procReadWrite.log:       2       2       0       0   00:00:23
       putStandAlone.log:      30      30       0       0   00:07:39
    ================================================================
          *** TOTALS ***:    2050    2008      38       4
    Finished: Fri Sep 28 14:14:13 PDT 2007
    In the above case the overall system test failed because there were 4 unexpected failures from the dbperformance tests. Looking at the dbperformance.log file, there were mismatches in the process table in the database due to extra records.
    /var/tmp/process1000.ilwd has 17 mismatched columns with /var/tmp/process1000.xml
  7. How to run selected tests e.g. If only compression test is desired,
    
    /ldas/testbin/SystemTest.tcl --site dev -debug 0 -verbose lpse --enable-globus 1 --enable-gsi 1 
    --qa-debug-level 1 --manager-reply-timeout 1200000 -match '*compresstest*'
    
    tcltest will go through each test and only run those that match the pattern.
  8. How to run individual tests Individual tests in /ldas/testbin can also invoked independently if supplied with the proper arguments. e.g.
    /ldas/testbin/compresstest.tcl --site dev -debug 0 -verbose lpse --enable-globus 1 --enable-gsi 1 
    --qa-debug-level 1 --manager-reply-timeout 1200000 > & compresstest.log &