Changeset 207 for trunk/test
- Timestamp:
- Jan 16, 2009, 11:52:26 PM (16 years ago)
- Location:
- trunk/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/testrun_1.sh
r172 r207 190 190 # 191 191 TESTPOLICY_11=" 192 [Misc] 193 UseAclCheck=yes 194 UseSelinuxCheck=yes 192 195 [ReadOnly] 193 196 dir=99${BASE} … … 231 234 232 235 TESTPOLICY_10=" 236 [Misc] 237 UseAclCheck=yes 238 UseSelinuxCheck=yes 233 239 [ReadOnly] 234 240 dir=99${BASE} … … 253 259 # 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"; 254 260 tmp=`grep CRIT $LOGFILE | wc -l` 255 if [ $tmp -ne 3]; then261 if [ $tmp -ne 5 ]; then 256 262 [ -z "$verbose" ] || log_msg_fail "policy count"; 257 263 return 1 … … 1241 1247 let "tcount = tcount + 1" >/dev/null 1242 1248 # 1243 if [ -z "$doall" -a $tcount -eq 10 ]; then 1244 log_skip 10 $MAXTEST 'ACL/SELinux test (or use --really-all)' 1245 let "tcount = tcount + 1" >/dev/null 1246 fi 1247 # 1248 if [ -z "$doall" -a $tcount -eq 11 ]; then 1249 log_skip 11 $MAXTEST 'ACL/SELinux test (or use --really-all)' 1250 let "tcount = tcount + 1" >/dev/null 1249 if [ $tcount -eq 10 ]; then 1250 if [ -z "$doall" ]; then 1251 log_skip 10 $MAXTEST 'ACL/SELinux test (or use --really-all)' 1252 log_skip 11 $MAXTEST 'ACL/SELinux test (or use --really-all)' 1253 let "tcount = tcount + 2" >/dev/null 1254 else 1255 # 'id -u' is posix 1256 # 1257 if test -f /usr/xpg4/bin/id 1258 then 1259 my_uid=`/usr/xpg4/bin/id -u` 1260 else 1261 my_uid=`id -u` 1262 fi 1263 # 1264 if [ ${my_uid} -ne 0 ]; then 1265 log_skip 10 $MAXTEST 'ACL/SELinux test (you are not root)' 1266 log_skip 11 $MAXTEST 'ACL/SELinux test (you are not root)' 1267 let "tcount = tcount + 2" >/dev/null 1268 else 1269 1270 SETFATTR=`find_path setfattr` 1271 if [ -z "$SETFATTR" ]; then 1272 log_skip 10 $MAXTEST 'ACL/SELinux test (setfattr not in path)' 1273 log_skip 11 $MAXTEST 'ACL/SELinux test (setfattr not in path)' 1274 let "tcount = tcount + 2" >/dev/null 1275 fi 1276 fi 1277 fi 1251 1278 fi 1252 1279 # -
trunk/test/testrun_2a.sh
r172 r207 221 221 cp ./testrc_2 ./rc.${SH_LOCALHOST} 222 222 mv ./.samhain_file ./file.${SH_LOCALHOST} 223 chmod 644 ./rc.${SH_LOCALHOST} 224 chmod 644 ./file.${SH_LOCALHOST} 223 225 224 226 ALTHOST=`find_hostname` 225 227 cp ./testrc_2 "./rc.${ALTHOST}" 226 228 cp ./file.${SH_LOCALHOST} "./file.${ALTHOST}" 2>/dev/null 229 chmod 644 ./rc.${ALTHOST} 230 chmod 644 ./file.${ALTHOST} 227 231 } 228 232 -
trunk/test/testrun_2d.sh
r170 r207 38 38 # PGPASSWORD=samhain; export PGPASSWORD 39 39 create_pgpass 40 psql - U samhain -d samhain -c "SELECT * FROM log WHERE entry_status = 'NEW' and log_time > '${DATE}';" >test_log_db40 psql -o test_log_db -U samhain -d samhain -c "SELECT * FROM log WHERE entry_status = 'NEW' and log_time > '${DATE}';" 41 41 # 42 42 egrep "START.*Yule" test_log_db >/dev/null 2>&1 43 43 if [ $? -ne 0 ]; then 44 [ -z "$verbose" ] || log_msg_fail "Server start ";44 [ -z "$verbose" ] || log_msg_fail "Server start (psql)"; 45 45 return 1 46 46 fi 47 47 egrep "NEW CLIENT" test_log_db >/dev/null 2>&1 48 48 if [ $? -ne 0 ]; then 49 [ -z "$verbose" ] || log_msg_fail "Client connect ";49 [ -z "$verbose" ] || log_msg_fail "Client connect (psql)"; 50 50 return 1 51 51 fi 52 52 egrep "Checking.*/bin" test_log_db >/dev/null 2>&1 53 53 if [ $? -ne 0 ]; then 54 [ -z "$verbose" ] || log_msg_fail "Client file check ";54 [ -z "$verbose" ] || log_msg_fail "Client file check (psql)"; 55 55 return 1 56 56 fi 57 57 egrep "EXIT.*Samhain" test_log_db >/dev/null 2>&1 58 58 if [ $? -ne 0 ]; then 59 [ -z "$verbose" ] || log_msg_fail "Client exit ";59 [ -z "$verbose" ] || log_msg_fail "Client exit (psql)"; 60 60 return 1 61 61 fi 62 62 egrep "EXIT.*Yule.*SIGTERM" test_log_db >/dev/null 2>&1 63 63 if [ $? -ne 0 ]; then 64 [ -z "$verbose" ] || log_msg_fail "Server exit ";64 [ -z "$verbose" ] || log_msg_fail "Server exit (psql)"; 65 65 return 1 66 66 fi
Note:
See TracChangeset
for help on using the changeset viewer.