Changeset 122


Ignore:
Timestamp:
Sep 6, 2007, 9:18:50 PM (17 years ago)
Author:
rainer
Message:

Regression test for options IgnoreMissing, IgnoreAdded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/testrun_1.sh

    r68 r122  
    311311file=${BASE}/a/a/a/z
    312312dir=${BASE}/b
     313[Misc]
     314IgnoreMissing=${BASE}/a/[[:alnum:]]+/[[:alnum:]]+\$
     315IgnoreAdded=${BASE}/a/(b|c)/[[:alnum:]]+\$
    313316"
    314317
     
    321324    chmod 0555     "${BASE}/a"       # bad
    322325    chmod 0555     "${BASE}/b"       # ok
     326
     327    rm    "${BASE}/a/c/z"
     328    touch "${BASE}/a/c/zz2"
    323329}
    324330
     
    326332chk_testdata_7 () {
    327333    tmp=`grep CRIT $LOGFILE | wc -l`
    328     if [ $tmp -ne 3 ]; then
    329         [ -z "$verbose" ] || log_msg_fail "policy count";
     334    if [ $tmp -ne 4 ]; then
     335        [ -z "$verbose" ] || log_msg_fail "policy count";
     336        return 1
     337    fi
     338    egrep "ERROR.*POLICY MISSING.*${BASE}/a/c/z" $LOGFILE >/dev/null 2>&1
     339    if [ $? -eq 0 ]; then
     340        [ -z "$verbose" ] || log_msg_fail "${BASE}/a/c/z";
     341        return 1
     342    fi
     343    egrep "CRIT.*POLICY ADDED.*${BASE}/a/c/zz2" $LOGFILE >/dev/null 2>&1
     344    if [ $? -eq 0 ]; then
     345        [ -z "$verbose" ] || log_msg_fail "${BASE}/a/c/zz2";
    330346        return 1
    331347    fi
Note: See TracChangeset for help on using the changeset viewer.