Changeset 25 for trunk/test/testrun_1.sh


Ignore:
Timestamp:
Mar 14, 2006, 10:27:38 PM (19 years ago)
Author:
rainer
Message:

More tests; fix for update+schedule issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/testrun_1.sh

    r22 r25  
    2222testrun1_setup=0
    2323
    24 MAXTEST=10; export MAXTEST
     24MAXTEST=11; export MAXTEST
    2525
    2626test_dirs () {
     
    4646        fi
    4747    done
     48}
     49
     50#
     51# combine file check schedule with one-shot mode
     52#
     53TESTPOLICY_11="
     54[ReadOnly]
     55dir=99${BASE}
     56"
     57
     58mod_testdata_11 () {
     59    sleep 1
     60    echo "foobar" >"${BASE}/c/x"; # bad
     61    chmod 0555  "${BASE}/a/y";    # bad
     62    ORIGINAL='SetFilecheckTime=60'
     63    REPLACEMENT='FileCheckScheduleOne = 6 12 * * *'
     64    ex $RCFILE <<EOF
     65:%s/${ORIGINAL}/${REPLACEMENT}/g
     66:wq
     67EOF
     68}
     69
     70chk_testdata_11 () {
     71    # CDIRS="a b c a/a a/b a/c a/a/a a/a/b a/a/c a/a/a/a a/a/a/b a/a/a/c";
     72    tmp=`grep CRIT $LOGFILE | wc -l`
     73    if [ $tmp -ne 2 ]; then
     74        [ -z "$verbose" ] || log_msg_fail "policy count";
     75        return 1
     76    fi
     77    egrep "CRIT.*POLICY \[ReadOnly\] C-------TS.*${BASE}/c/x" $LOGFILE >/dev/null 2>&1
     78    if [ $? -ne 0 ]; then
     79        [ -z "$verbose" ] || log_msg_fail "${BASE}/c/x";
     80        return 1
     81    fi
     82    egrep "CRIT.*POLICY \[ReadOnly\] -----M--T-.*${BASE}/a/y" $LOGFILE >/dev/null 2>&1
     83    if [ $? -ne 0 ]; then
     84        [ -z "$verbose" ] || log_msg_fail "${BASE}/a/y";
     85        return 1
     86    fi
     87    CDIRS="a a/a a/b a/c c b a/a/a a/a/b a/a/c a/a/a/a a/a/a/b a/a/a/c";
     88    NDIRS="";
     89    test_dirs;
     90    return $?
    4891}
    4992
Note: See TracChangeset for help on using the changeset viewer.