Changeset 481 for trunk/test


Ignore:
Timestamp:
Jul 18, 2015, 5:06:52 PM (9 years ago)
Author:
katerina
Message:

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

Location:
trunk/test
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/test.sh

    r235 r481  
    151151    echo "  ${S}test.sh  9${E}  -- Process check"
    152152    echo "  ${S}test.sh 10${E}  -- Port check"
     153    echo "  ${S}test.sh 11${E}  -- CL verify option"
     154    echo "  ${S}test.sh 12${E}  -- CL create DeltaDB"
     155    echo "  ${S}test.sh 13${E}  -- CL create/verify partial DB"
    153156
    154157    echo "  ${S}test.sh 20${E}  -- Test c/s init/check      (testrc_2.in)"
     
    157160    echo "  ${S}test.sh 23${E}  -- Test full c/s w/mysql    (testrc_2.in)"
    158161    echo "  ${S}test.sh 24${E}  -- Test full c/s w/postgres (testrc_2.in)"
     162    echo "  ${S}test.sh 25${E}  -- Test server w/yulectl    (testrc_2.in)"
     163    echo "  ${S}test.sh 26${E}  -- Test c/s case one        (testrc_2.in)"
     164    echo "  ${S}test.sh 27${E}  -- Test c/s case two        (testrc_2.in)"
    159165    echo "  ${S}test.sh all${E} -- All tests"
    160166}
     
    164170    echo "  (1) testcompile.sh (2) testhash.sh     (3) testrun_1.sh   (4) testrun_1a.sh"
    165171    echo "  (5) testext.sh     (6) testtimesrv.sh  (7) testrun_1b.sh  (8) testrun_1c.sh"
    166     echo "  (9) testrun_1d.sh (10) testrun_1e.sh"
     172    echo "  (9) testrun_1d.sh (10) testrun_1e.sh  (11) testrun_1f.sh (12) testrun_1g.sh"
     173    echo " (13) testrun_1h.sh"
    167174    echo " (20) testrun_2.sh  (21) testrun_2a.sh  (22) testrun_2b.sh (23) testrun_2c.sh"
    168     echo " (24) testrun_2d.sh"
     175    echo " (24) testrun_2d.sh (25) testrun_2e.sh  (26) testrun_2f.sh (27) testrun_2g.sh"
    169176}
    170177
     
    434441    rm -f testrc_1ext
    435442    rm -f ./.samhain_file
     443    rm -f file.*.*-*-*-*-*
    436444    rm -f ./.samhain_log*
    437445    rm -f ./.samhain_lock*
     
    446454    rm -f yule.html2
    447455    rm -f test_dnmalloc
     456    rm -f tmp_list_file
     457    rm -f test_filter.txt
    448458}
    449459
     
    626636    exit $?
    627637fi
     638if test x$1 = x11; then
     639    . ${SCRIPTDIR}/testrun_1.sh
     640    . ${SCRIPTDIR}/testrun_1f.sh
     641    testrun1f
     642    print_summary
     643    exit $?
     644fi
     645if test x$1 = x12; then
     646    . ${SCRIPTDIR}/testrun_1.sh
     647    . ${SCRIPTDIR}/testrun_1g.sh
     648    testrun1g
     649    print_summary
     650    exit $?
     651fi
     652if test x$1 = x13; then
     653    . ${SCRIPTDIR}/testrun_1.sh
     654    . ${SCRIPTDIR}/testrun_1h.sh
     655    testrun1h
     656    print_summary
     657    exit $?
     658fi
    628659if test x$1 = x20; then
    629660    . ${SCRIPTDIR}/testrun_2.sh
     
    659690    exit $?
    660691fi
     692if test x$1 = x25; then
     693    . ${SCRIPTDIR}/testrun_2e.sh
     694    testrun2e $hostname
     695    print_summary
     696    exit $?
     697fi
     698if test x$1 = x26; then
     699    . ${SCRIPTDIR}/testrun_2f.sh
     700    testrun2f $hostname
     701    print_summary
     702    exit $?
     703fi
     704if test x$1 = x27; then
     705    . ${SCRIPTDIR}/testrun_2g.sh
     706    testrun2g $hostname
     707    print_summary
     708    exit $?
     709fi
    661710if test x$1 = xall; then
    662711    TEST_MAX=0
     
    681730    . ${SCRIPTDIR}/testrun_1e.sh
    682731    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     732    . ${SCRIPTDIR}/testrun_1f.sh
     733    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     734    . ${SCRIPTDIR}/testrun_1g.sh
     735    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     736    . ${SCRIPTDIR}/testrun_1h.sh
     737    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
    683738    . ${SCRIPTDIR}/testrun_2.sh
    684739    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     
    690745    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
    691746    . ${SCRIPTDIR}/testrun_2d.sh
     747    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     748    . ${SCRIPTDIR}/testrun_2e.sh
     749    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     750    . ${SCRIPTDIR}/testrun_2f.sh
     751    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     752    . ${SCRIPTDIR}/testrun_2g.sh
    692753    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
    693754    #
     
    734795    testrun1e
    735796    #
     797    . ${SCRIPTDIR}/testrun_1.sh
     798    . ${SCRIPTDIR}/testrun_1f.sh
     799    MAXTEST=${TEST_MAX}; export MAXTEST
     800    testrun1f
     801    #
     802    . ${SCRIPTDIR}/testrun_1.sh
     803    . ${SCRIPTDIR}/testrun_1g.sh
     804    MAXTEST=${TEST_MAX}; export MAXTEST
     805    testrun1g
     806    #
     807    . ${SCRIPTDIR}/testrun_1.sh
     808    . ${SCRIPTDIR}/testrun_1h.sh
     809    MAXTEST=${TEST_MAX}; export MAXTEST
     810    testrun1h
     811    #
    736812    . ${SCRIPTDIR}/testrun_2.sh
    737813    MAXTEST=${TEST_MAX}; export MAXTEST
     
    753829    MAXTEST=${TEST_MAX}; export MAXTEST
    754830    testrun2d $hostname
     831    #
     832    . ${SCRIPTDIR}/testrun_2e.sh
     833    MAXTEST=${TEST_MAX}; export MAXTEST
     834    testrun2e $hostname
     835    #
     836    . ${SCRIPTDIR}/testrun_2f.sh
     837    MAXTEST=${TEST_MAX}; export MAXTEST
     838    testrun2f $hostname
     839    #
     840    . ${SCRIPTDIR}/testrun_2g.sh
     841    MAXTEST=${TEST_MAX}; export MAXTEST
     842    testrun2g $hostname
    755843    #
    756844    print_summary
     
    768856
    769857__ARCHIVE_FOLLOWS__
    770 ‹£ÉúDí•ÏoãDÇœ UbN\'€‘8*Û:IӔJ‘pãÔ-›ŠùєBU!o2M
    771 þ‘z&éf/ˆ‚#§šgGâßa%7U$ĉHš‡U{àÚš
    772 ã$M¶Ûª‚.¬4Ù
    773 Ï›™÷Þ×3ž!39•Î€§dœänž2;3ã”.Ÿ—ïÕ]ýzïÕëóq.~Æ7ëqû\³
    774 môž<
    775 äo'q²˜È&„œ)+:2¯ê‡L|
    776 Ÿ˜aù’p×a!(-‡aDŠÀø²Šp%
    777 R°×–dŒ3ãK‚
     858‹p{Uí•=lÛFÇé©Å!sÑ-di‘D&%‹r
     859#QŽ™Ö—
     860نQ0҉b͕€d+Kеk—¢@75k塀l}!KaDԙ:µC=öÐՂ“
     861¥Ø–RA
     8628MûÄñþw÷ã;َ•ñ(Å#ÛêR 1ìܜ[2?=^º0þ@€bŒ~ËÒ^ÆÇR4ãcX–‚ôåž3IÑvd
     863BʒUY¯î÷ºöÿ)7]n
     864bD‚11“QBpIH&yQ6‚EÙÎ/Àä"ÏÉtBž&ع€²
     865pÍ,B¡,bL„Ž   KÈRseèäUêȶe6xDZÔ{Eٛ §jˆ›EN€kÐ0
     866h!YÓÊP3·ÉŸqG(kºi;P)ʖl8î
     867Ø:ÚQmlˆ–¹­JÔTÂî€1“³6²JjÙcR
     868ۯ늓Å.        %d8Iä:ì”7ÁÙ×
     869¶@sü9!1“RÉÙeC+OªgMªÞŸÔQ
     870ÓB’i Iýb±Šõç5Û–-ã\
     871M‰Ç}.†TËæT#gž+’Œ÷c4l`g6Á’¬jg­xŒ–Ï
     872Ñ
     873e[ӆb–z±p£9Àƒjg6AHFºiànxVÇõ+“G™­”ª#ŽñÒ®˜@™¢e«ŠÅ4ŽŠQÓ,
     874;±4H ‚i9ᢊ
     875ƒ
    778876„
    779 "ÒZ'å
    780 JÍÃOŒ,ÔJAIÏF$H
    781 ˜CŠ²‡dGÁPCËiØ1•ûY‚ðØVTäŸF$        ÀÛP74‘¬ªyši§  ¿iG(«š        LgeS։ƒzGLÀŠd{ŠžéEgÀˆËi:K9%‰ðˆi‡ú­kIє‚9€“8r&ù-pþ– 
    782 x’ŸŽ™\㊒S«ºš·ž'4nœÈöo
    783 ËiÝ0QØÐÑžýâc]Ö_PUÿžlêCs?$ýT÷Ð(*&ö+ú¶1Ž„e:ý‘`“&³VdE=o¥ãušyhèÇÈcuÄÖë1•‹×6WœÜ¢Œ4C§ÝhTâä•ÜAÉ/Ö
    784 ù]nÞ1ÆP2kbÅÐCԁêwõŒ!ÃÈô:Íò †2†I³ª*"B„~ºF@Àñƒ³ÚÝ®ü=§Î
    785 ®.npÉ
    786 Ö±Áâ]GœhóƒšsM¹§Œð])œ˜)zöÁ{(✾]
    787 NâUi—×òÂKùÔ'|ÄÇp4çÑøûá{Þ¹ð¯GCº›V–}ÑtE4w¬ðáXÄ÷0ê‘Ð
    788 ˆŠ)Xöÿ¶DU÷ †ÅËÒû¯n
    789 ËÚÝú>sþ[:®ÙÿÝ^Þ{ŸÿÏxœ^gÿ÷¹ÙþÿBx1ûÿO¿üÐùœý˜¯œ:žÃ
    790 œ_y>¬‰^ýËïOE§,>/G)ŒÀÑö7žîÑÑÙ³ú.µ>>é>ý£[p.®|Cèðýã³'à.(|u¹œ;ô.§&žý;ýú[?öÓÿî›øXù\9Žýfr
    791 Ý§
    792 nÁ¹žN­Z­•ÊõÃÃfѶËõR§]Žª¥b»Ø²Ú
    793 ë°T¬5:õF±TkÚ­Ž]ÈÙÿíèôìôQÉ79î끚ǭŸ(øhŒ|®šÏÑš(»\Ž¬b«}xPjV«õZµa7êµJŲJ•r»b[Tfë VªÖ+TߏÎN®Ñ$Ñu‡?ì×OšÊߟ³à”’Œp¥&ÚïhjØ
    794 «ÒŽ«õN˲[Z³U/µ*õš]?,µ*öA£ZîXV¥n7;É:=îþùë“cg®žúrR ZþÅS\%c§ž7„{¢äâI`nÝ+
    795 ž‡©D@ÌMûB‰˜gÝéœEa-’^ú|7¢EgƒædFü8(íFdLOñɄ
    796 ûŸâ
    797 ƒÁ`0
    798 ƒÁ`0
    799 ƒÁ`0
    800 FŸ¿ès((
     877># èÚ±‹z
     878§+nhÔÝÁåð&SN0ŸZIŒ8Œ«h8Û‹Zb<^~$J+³QÕ(î|
     879€šÝŽ‡
     880ëvzYü‚ÖËü­ô¢w;ÁÖü§tŽ—|:}OºãŸ—ÒŽ^š_ŠâJÅto        ,ÑR"ž÷‰(
     881€ £«|#
     882àr"Žzèˆ
     883Š¹÷_ÿþ”Ç–õ<NmŸ¹ÿÇ%]ÃüÏŸ:ÿ³¬ÿ,ÿ3–vó?KûIþŒüÿëo?õŸ€cž¢
     884`Þ{҇ïñ;C]ÁeTÿª^^qËçN–ãTÆpëPƒÃÃÓÆ7]=
     885<ûkPqjï
     886Á£?Ô/O
     887PÔãӧà&š|9=¬üþðÉêÆÌš
     888üöþ0Œk!ÏDù/ÂúqªúMeð¬2šžÕît·[ýÝf³ßkµúµƒn£Õì4v[ûÝ~³ÛÚoWö:m¬7÷z­Z
     889¿zõ"¬‡
     890žœžŒ&žŸñžå¢£úw_‚Snùhÿ8uiÁõ«ûµN£±Ûk÷;j»ßݯï
     891tkœfµW­7v»Õ^§^ëvêõÇ»œNïåàNŽÏzäÆ÷†·Ÿ-„5OAž_
     892óÚj€¿çƒÊVüâæ(¯–” ¢Éó‘$ŸžÛﮢì
     893»
     894ž^HM
     895øb[Œy'ñ
     896“ëhIæŒëw5o2
     897ÒÐb!f|81œž|·o
     898@ @ @ ð.ò7–<̐(
  • trunk/test/testcompile.sh

    r474 r481  
    157157        if [ $? -eq 0 ]; then
    158158            isLinux=1
    159             sed --in-place 's/-Wall/-Wall -Werror/' Makefile
     159            sed --in-place 's/-Wall/-Wall -Werror -Wpointer-arith -Wcast-qual/' Makefile
    160160        fi
    161161        #
  • trunk/test/testhash.sh

    r378 r481  
    6363        fi
    6464        #
    65         ${TOP_SRCDIR}/configure --enable-debug=gdb --quiet $TRUST --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file --enable-db-reload '--enable-login-watch' '--enable-mounts-check' ${C_LOGFILE} '--enable-port-check' '--enable-suidcheck' '--with-rnd=unix'
     65        ${TOP_SRCDIR}/configure --enable-debug=gdb --quiet $TRUST --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file --enable-db-reload '--enable-login-watch' '--enable-mounts-check' ${C_LOGFILE} '--enable-port-check' '--enable-suidcheck' '--enable-message-queue'
    6666        #
    6767        fail=0
  • trunk/test/testrun_1.sh

    r371 r481  
    4242
    4343MAXTEST=15; export MAXTEST
     44MAXTEST_3=15; export MAXTEST_3
    4445
    4546test_dirs () {
     
    11441145    }
    11451146
     1147    echo "${BASE}" > ./tmp_list_file
     1148
    11461149    for ff in $TDIRS; do
    11471150        mkdir "${BASE}/${ff}" || {
     
    11491152            return 1;
    11501153        }
     1154        echo "${BASE}/${ff}" >> ./tmp_list_file
    11511155        chmod 0755 "${BASE}/${ff}"
    11521156        for gg in $TFILES; do
    11531157            echo "1 This is a test file" > "${BASE}/${ff}/${gg}"
    11541158            chmod 0644 "${BASE}/${ff}/${gg}"
     1159            echo "${BASE}/${ff}/${gg}"  >> ./tmp_list_file
    11551160            ln -s "${BASE}/${ff}/${gg}" "${BASE}/${ff}/l_${gg}"
     1161            echo "${BASE}/${ff}/l_${gg}"  >> ./tmp_list_file
    11561162        done
    11571163        echo "2 This is a test file" >> "${BASE}/${ff}/y"
     
    12071213        POLICY=`eval echo '"$'"TESTPOLICY_$tcount"'"'`
    12081214
    1209         until [ -z "$POLICY" ]
     1215        until [ ${tcount} -gt ${MAXTEST_3} ]
    12101216        do
    12111217          prep_init
  • trunk/test/testrun_1a.sh

    r155 r481  
    2727testrun_stealth ()
    2828{
    29     tcount=14
     29    tcount=1
    3030
    3131    if test -r "Makefile"; then
  • trunk/test/testrun_2a.sh

    r472 r481  
    2323RCFILE="$PW_DIR/testrc_2";  export RCFILE
    2424
    25 SERVER_BUILDOPTS="--quiet  $TRUST --enable-network=server --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=REQ_FROM_SERVER$PW_DIR/testrc_2 --with-data-file=REQ_FROM_SERVER$PW_DIR/.samhain_file --with-logserver=${SH_LOCALHOST}  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock"; export SERVER_BUILDOPTS
    26 
    27 CLIENT_BUILDOPTS="--quiet  $TRUST --enable-network=client --enable-srp --prefix=$PW_DIR --with-tmp-dir=$PW_DIR --localstatedir=$PW_DIR --with-config-file=REQ_FROM_SERVER$RCFILE --with-data-file=REQ_FROM_SERVER$PW_DIR/.samhain_file  --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --enable-suidcheck"; export CLIENT_BUILDOPTS
     25SERVER_BUILDOPTS="--quiet  $TRUST --enable-network=server --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=REQ_FROM_SERVER$PW_DIR/testrc_2 --with-data-file=REQ_FROM_SERVER$PW_DIR/.samhain_file --with-logserver=${SH_LOCALHOST}  --with-log-file=$PW_DIR/.samhain_log --with-pid-file=$PW_DIR/.samhain_lock --enable-debug=gdb"; export SERVER_BUILDOPTS
     26
     27CLIENT_BUILDOPTS="--quiet  $TRUST --enable-network=client --enable-srp --prefix=$PW_DIR --with-tmp-dir=$PW_DIR --localstatedir=$PW_DIR --with-config-file=REQ_FROM_SERVER$RCFILE --with-data-file=REQ_FROM_SERVER$PW_DIR/.samhain_file  --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --enable-suidcheck --enable-debug"; export CLIENT_BUILDOPTS
    2828
    2929do_test_1_a () {
     
    233233}
    234234
    235 MAXTEST=6; export MAXTEST
     235MAXTEST=4; export MAXTEST
    236236
    237237testrun2a ()
     
    280280    fi
    281281    #
    282     SERVER_BUILDOPTS="${SERVER_BUILDOPTS_ORIG} --enable-encrypt=1"; export SERVER_BUILDOPTS
    283     CLIENT_BUILDOPTS="${CLIENT_BUILDOPTS_ORIG} --enable-encrypt=1"; export CLIENT_BUILDOPTS
     282    SERVER_BUILDOPTS="${SERVER_BUILDOPTS_ORIG} --disable-ipv6"; export SERVER_BUILDOPTS
     283    CLIENT_BUILDOPTS="${CLIENT_BUILDOPTS_ORIG} --disable-ipv6"; export CLIENT_BUILDOPTS
    284284    #
    285285    testrun2a_internal
    286286    do_test_1_a
    287287    if [ $? -eq 0 ]; then
    288         [ -z "$quiet" ] && log_ok   4 ${MAXTEST} "Encryption (v1)";
     288        [ -z "$quiet" ] && log_ok   4 ${MAXTEST} "IPv6 disabled";
    289289    else
    290         [ -z "$quiet" ] && log_fail 4 ${MAXTEST} "Encryption (v1)";
    291     fi
    292     #
    293     SERVER_BUILDOPTS="${SERVER_BUILDOPTS_ORIG}"; export SERVER_BUILDOPTS
    294     CLIENT_BUILDOPTS="${CLIENT_BUILDOPTS_ORIG} --enable-encrypt=1"; export CLIENT_BUILDOPTS
    295     #
    296     testrun2a_internal
    297     do_test_1_a
    298     if [ $? -eq 0 ]; then
    299         [ -z "$quiet" ] && log_ok   5 ${MAXTEST} "Encryption backward compat";
    300     else
    301         [ -z "$quiet" ] && log_fail 5 ${MAXTEST} "Encryption backward compat";
    302     fi
    303     #
    304     SERVER_BUILDOPTS="${SERVER_BUILDOPTS_ORIG} --disable-ipv6"; export SERVER_BUILDOPTS
    305     CLIENT_BUILDOPTS="${CLIENT_BUILDOPTS_ORIG} --disable-ipv6"; export CLIENT_BUILDOPTS
    306     #
    307     testrun2a_internal
    308     do_test_1_a
    309     if [ $? -eq 0 ]; then
    310         [ -z "$quiet" ] && log_ok   6 ${MAXTEST} "IPv6 disabled";
    311     else
    312         [ -z "$quiet" ] && log_fail 6 ${MAXTEST} "IPv6 disabled";
     290        [ -z "$quiet" ] && log_fail 4 ${MAXTEST} "IPv6 disabled";
    313291    fi
    314292    #
  • trunk/test/testrun_2d.sh

    r207 r481  
    101101    testrun2a_internal
    102102    #
     103    for ff in ./rc.*; do
     104    ORIGINAL="SetUdpActive=no"
     105    REPLACEMENT="ReportCheckflags=yes"
     106    ex -s rc.morrigan.localdomain <<EOF
     107%s/$ORIGINAL/$REPLACEMENT/g
     108wq
     109EOF
     110    done
     111    #
    103112    ORIGINAL="DatabaseSeverity=none"
    104113    REPLACEMENT="DatabaseSeverity=info"
Note: See TracChangeset for help on using the changeset viewer.