Ignore:
Timestamp:
Jun 29, 2021, 10:23:44 PM (3 years ago)
Author:
katerina
Message:

Fix for ticket #450 (compiler warnings) and fixes for tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/testrun_1b.sh

    r539 r562  
    239239do_test_1b_2 () {
    240240
    241     rm -f $PW_DIR/test_log_prelude
    242 
    243     [ -z "$verbose" ] || { echo " starting prelude-manager.."; echo " ($PM --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &)"; }
    244     "$PM" --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &
    245     PID=$!
    246 
    247     five_sec_sleep
     241    #rm -f $PW_DIR/test_log_prelude
     242    test_log_prelude="/var/log/prelude/prelude-text.log"
     243    echo -n >"${test_log_prelude}"
     244   
     245    #[ -z "$verbose" ] || { echo " starting prelude-manager.."; echo " ($PM --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &)"; }
     246    #"$PM" --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &
     247    #PID=$!
     248
     249    #five_sec_sleep
    248250
    249251    ./samhain -t check -p none -l info --set-prelude-severity=info --prelude --server-addr 127.0.0.1:5500 >/dev/null
     
    259261    else
    260262        [ -z "$quiet" ]   && log_msg_fail  "check...";
    261         kill $PID
     263        #kill $PID
    262264        return 1
    263265    fi
    264266    #
    265     tmp=`egrep 'File original:.*name=etc.*path=/etc' test_log_prelude 2>/dev/null | wc -l`
     267    tmp=`egrep 'File original:.*name=etc.*path=/etc' ${test_log_prelude} 2>/dev/null | wc -l`
    266268    if [ $tmp -lt 1 ]; then
    267269        [ -z "$verbose" ] || log_msg_fail "/etc";
    268         kill $PID
    269         return 1
    270     fi
    271     tmp=`egrep 'Classification text: Checking' test_log_prelude 2>/dev/null | wc -l`
     270        #kill $PID
     271        return 1
     272    fi
     273    tmp=`egrep 'Classification text: Checking' ${test_log_prelude} 2>/dev/null | wc -l`
    272274    if [ $tmp -lt 1 ]; then
    273275        [ -z "$verbose" ] || log_msg_fail "checking";
    274         kill $PID
     276        #kill $PID
    275277        return 1
    276278    fi
    277279    #
    278280    if test "x$2" = "xmodrc"; then
    279         tmp=`egrep 'Classification text: Service opened' test_log_prelude 2>/dev/null | wc -l`
     281        tmp=`egrep 'Classification text: Service opened' ${test_log_prelude} 2>/dev/null | wc -l`
    280282        if [ $tmp -lt 1 ]; then
    281283            [ -z "$verbose" ] || log_msg_fail "service";
    282             kill $PID
    283             return 1
    284         fi
    285         tmp=`egrep 'Service: port=5500' test_log_prelude 2>/dev/null | wc -l`
     284            #kill $PID
     285            return 1
     286        fi
     287        tmp=`egrep 'Service: port=5500' ${test_log_prelude} 2>/dev/null | wc -l`
    286288        if [ $tmp -lt 1 ]; then
    287289            [ -z "$verbose" ] || log_msg_fail "port 5500";
    288             kill $PID
     290            #kill $PID
    289291            return 1
    290292        fi
    291293    fi
    292294    #
    293     kill $PID
     295    #kill $PID
    294296    return 0
    295297}
Note: See TracChangeset for help on using the changeset viewer.