ci: cram: add 60-check-for-fatal-errors.t testcase
Adding 60-check-for-fatal-errors.t testcase which at the end of test suite verifies for any fail action taken by amx-processmonitoring. Testcases part of amx-processmonitoring has sufficent handling included to ensure process kill doesn't result in FailAction execution by amx-processmonitoring, hence logging of any FailAction taken by amx-processmonitoring would likely mean a failure. Adding additional check for Reboot.Reboot.*.Reason to ensure no Reboot due to process failure is triggered by amx-processmonitoring. References: PPW-1234 Signed-off-by: Hari Sriram <hari.s@capgemini.com>
This commit is contained in:
parent
72bffed2f9
commit
35cf378aea
27
.gitlab/tests/cram/post/generic/60-check-for-fatal-errors.t
Normal file
27
.gitlab/tests/cram/post/generic/60-check-for-fatal-errors.t
Normal file
@ -0,0 +1,27 @@
|
||||
Skip this test if the CI job name contains CDRouter and VLAN\
|
||||
as SSH to DUT is not available (PCF-844):
|
||||
|
||||
$ if echo "$CI_JOB_NAME" | grep -q "^CDRouter.* VLAN "; then exit 80; fi
|
||||
|
||||
Create R alias:
|
||||
|
||||
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||
|
||||
Ensure no unexpected failures obiserved by checking for failure action taken by\
|
||||
ProcessMointor.Test.i in /var/log/messages and rotated logs.
|
||||
|
||||
$ R "grep \"amx-processmonitor: process - \[!\]Test.*failed too often,"\
|
||||
> " executing action\" /var/log/messages* /var/log/messagess.? 2>/dev/null" \
|
||||
> "|| true"
|
||||
|
||||
Ensure no unexpected failures observed by checking for failure action taken by \
|
||||
ProcessMonitor.Test.i in compressed logs:
|
||||
|
||||
$ R "zcat /var/log/messages*.gz 2>/dev/null | "\
|
||||
> "grep \"amx-processmonitor: process - "\
|
||||
> "\[!\]Test.*failed too often, executing action\" || true"
|
||||
|
||||
Ensure no reboots are triggered due to failure by ProcessMonitor \
|
||||
for ProcessMonitor.Test.i:
|
||||
|
||||
$ R "ba-cli Reboot.Reboot.*.Reason?" | grep ProcessMonitor || true
|
||||
Loading…
Reference in New Issue
Block a user