tp-libvirt icon indicating copy to clipboard operation
tp-libvirt copied to clipboard

Add new test case: guest_kdump test

Open misanjumn opened this issue 1 year ago • 1 comments

Add new test case: guest_kdump test

The patch introduces guest kernel debugging via kdump mechanism.

The script is used to test the kdump functionality of the guest(s). 1. Check if kdump.service is operational 2. Get the vmcores present in the guest 3. Load the stress app if specified 4. Trigger crash simultaneously in all guests 5. Debug vmcore using crash utility if specified

Using this patch the followng scenarios can be verified 1. single-guest: a. kdump with no stress b. kdump with stress c. kdump with stress with crash utility 3. multi-guests: a. kdump with no stress b. kdump with stress c. kdump with stress with crash utility

Signed-off-by: Misbah Anjum N [email protected]

misanjumn avatar Feb 11 '25 08:02 misanjumn

Scenario

Multi-guests with kdump with crash utility check

vms = vm1, vm2 guest_stress = yes crash_utility = yes

Avocado Run:

JOB ID     : b6598160f2ef6037aca7835b2e86149bdc721cff
JOB LOG    : /home/kvmci/results/job-2025-02-10T14.04-b659816/job.log
 (1/1) type_specific.io-github-autotest-libvirt.multivm_cpustress.custom_host_events.custom_vm_events: STARTED
 (1/1) type_specific.io-github-autotest-libvirt.multivm_cpustress.custom_host_events.custom_vm_events:  PASS (534.35 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/kvmci/results/job-2025-02-10T14.04-b659816/results.html
JOB TIME   : 538.46 s
14:13:38 INFO    :
14:13:38 INFO    : Summary of test results can be found below:
TestSuite                                                                                TestRun    Summary

guest_kdump                                                                              Run        Successfully executed
/home/kvmci/results/job-2025-02-10T14.04-b659816/job.log
| PASS 1 || CANCEL 0 || ERRORS 0 || FAILURES 0 || SKIP 0 || WARN 0 || INTERRUPT 0 |

Triggering Crash:

[stdlog] 2025-02-10 14:07:51,577 avocado.multivm_stress multivm_stress   L0107 INFO | Triggering sysrq crash in guest vm1
[stdlog] 2025-02-10 14:07:51,578 avocado.multivm_stress multivm_stress   L0107 INFO | Triggering sysrq crash in guest vm2
[stdlog] 2025-02-10 14:07:51,578 aexpect.client client           L1199 DEBUG| [***] Sending command: echo c > /proc/sysrq-trigger
[stdlog] 2025-02-10 14:07:51,578 aexpect.client client           L1199 DEBUG| [***] Sending command: echo c > /proc/sysrq-trigger

Crash utility Output for vm1:

[stdlog]     DUMPFILE: /var/crash/127.0.0.1-2025-02-10-14:08:11/vmcore  [PARTIAL DUMP]
[stdlog]         CPUS: 32
[stdlog]         DATE: Mon Feb 10 14:07:51 CST 2025
[stdlog]       UPTIME: 00:02:46
[stdlog] LOAD AVERAGE: 8.86, 3.53, 1.31
[stdlog]        TASKS: 564
[stdlog]     NODENAME: localhost.localdomain
[stdlog]      RELEASE: 6.12.11-200.fc41.ppc64le
[stdlog]      VERSION: #1 SMP Fri Jan 24 04:44:21 UTC 2025
[stdlog]      MACHINE: ppc64le  (3450 Mhz)
[stdlog]       MEMORY: 10 GB
[stdlog]        PANIC: "Kernel panic - not syncing: sysrq triggered crash"
[stdlog]          PID: 3997
[stdlog]      COMMAND: "bash"
[stdlog]         TASK: c000000072ad8300  [THREAD_INFO: c000000072ad8300]
[stdlog]          CPU: 3
[stdlog]        STATE: TASK_RUNNING (PANIC)

misanjumn avatar Feb 11 '25 08:02 misanjumn

@misanjumn can you please fix the checks above.

harihare avatar Apr 02 '25 08:04 harihare

@misanjumn can you please fix the checks above.

@harihare

I have fixed the Travis checks, Thank you.

misanjumn avatar Apr 09 '25 09:04 misanjumn