[PATCH] KVM test: Minor enhancement for kdump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make the crash kerenl prob command could be configurated.
Use carshkernel=128M instead of crashkerenl=128M@64M.

Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
---
 client/tests/kvm/tests/kdump.py        |   10 ++++++----
 client/tests/kvm/tests_base.cfg.sample |    4 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/client/tests/kvm/tests/kdump.py b/client/tests/kvm/tests/kdump.py
index a5843c7..90c8cd2 100644
--- a/client/tests/kvm/tests/kdump.py
+++ b/client/tests/kvm/tests/kdump.py
@@ -18,11 +18,14 @@ def run_kdump(test, params, env):
     timeout = float(params.get("login_timeout", 240))
     crash_timeout = float(params.get("crash_timeout", 360))
     session = kvm_test_utils.wait_for_login(vm, 0, timeout, 0, 2)
-    def_kernel_param_cmd = ("grubby --update-kernel=`grubby --default-kernel`"
-                            " --args=crashkernel=128M@64M")
+    def_kernel_param_cmd = "grubby --update-kernel=`grubby --default-kernel`" \
+                           " --args=crashkernel=128M"
     kernel_param_cmd = params.get("kernel_param_cmd", def_kernel_param_cmd)
     def_kdump_enable_cmd = "chkconfig kdump on && service kdump start"
     kdump_enable_cmd = params.get("kdump_enable_cmd", def_kdump_enable_cmd)
+    def_crash_kernel_prob_cmd = "grep -q 1 /sys/kernel/kexec_crash_loaded"
+    crash_kernel_prob_cmd = params.get("crash_kernel_prob_cmd",
+                                       def_crash_kernel_prob_cmd)
 
     def crash_test(vcpu):
         """
@@ -55,8 +58,7 @@ def run_kdump(test, params, env):
 
     try:
         logging.info("Checking the existence of crash kernel...")
-        prob_cmd = "grep -q 1 /sys/kernel/kexec_crash_loaded"
-        s = session.get_command_status(prob_cmd)
+        s = session.get_command_status(crash_kernel_prob_cmd)
         if s != 0:
             logging.info("Crash kernel is not loaded. Trying to load it")
             # We need to setup the kernel params
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index 2ae7f78..3c248e2 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -667,7 +667,7 @@ variants:
     - clock_getres: install setup unattended_install.cdrom
         type = clock_getres
 
-    - kdump:
+    - kdump: unattended_install.cdrom
         type = kdump
         # time waited for the completion of crash dump
         # crash_timeout = 360
@@ -675,6 +675,8 @@ variants:
         # kernel_param_cmd = "grubby --update-kernel=`grubby --default-kernel` --args=crashkernel=128M@64M"
         # command to enable kdump service
         # kdump_enable_cmd = chkconfig kdump on && service kdump start
+        # command to probe the crash kernel
+        # crash_kernel_prob_cmd = "grep -q 1 /sys/kernel/kexec_crash_loaded"
 
     # system_powerdown, system_reset and shutdown *must* be the last ones
     # defined (in this order), since the effect of such tests can leave

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux