Changeset 562 for trunk/test/testrun_1b.sh
- Timestamp:
- Jun 29, 2021, 10:23:44 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/testrun_1b.sh
r539 r562 239 239 do_test_1b_2 () { 240 240 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 248 250 249 251 ./samhain -t check -p none -l info --set-prelude-severity=info --prelude --server-addr 127.0.0.1:5500 >/dev/null … … 259 261 else 260 262 [ -z "$quiet" ] && log_msg_fail "check..."; 261 kill $PID263 #kill $PID 262 264 return 1 263 265 fi 264 266 # 265 tmp=`egrep 'File original:.*name=etc.*path=/etc' test_log_prelude2>/dev/null | wc -l`267 tmp=`egrep 'File original:.*name=etc.*path=/etc' ${test_log_prelude} 2>/dev/null | wc -l` 266 268 if [ $tmp -lt 1 ]; then 267 269 [ -z "$verbose" ] || log_msg_fail "/etc"; 268 kill $PID269 return 1 270 fi 271 tmp=`egrep 'Classification text: Checking' test_log_prelude2>/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` 272 274 if [ $tmp -lt 1 ]; then 273 275 [ -z "$verbose" ] || log_msg_fail "checking"; 274 kill $PID276 #kill $PID 275 277 return 1 276 278 fi 277 279 # 278 280 if test "x$2" = "xmodrc"; then 279 tmp=`egrep 'Classification text: Service opened' test_log_prelude2>/dev/null | wc -l`281 tmp=`egrep 'Classification text: Service opened' ${test_log_prelude} 2>/dev/null | wc -l` 280 282 if [ $tmp -lt 1 ]; then 281 283 [ -z "$verbose" ] || log_msg_fail "service"; 282 kill $PID283 return 1 284 fi 285 tmp=`egrep 'Service: port=5500' test_log_prelude2>/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` 286 288 if [ $tmp -lt 1 ]; then 287 289 [ -z "$verbose" ] || log_msg_fail "port 5500"; 288 kill $PID290 #kill $PID 289 291 return 1 290 292 fi 291 293 fi 292 294 # 293 kill $PID295 #kill $PID 294 296 return 0 295 297 }
Note:
See TracChangeset
for help on using the changeset viewer.