1f08c3bdfSopenharmony_ciKDUMP TESTS AUTOMATION SUITE
2f08c3bdfSopenharmony_ci----------------------------
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_ciThe kdump test automation suite helps run the kdump tests and report
5f08c3bdfSopenharmony_ciresults.  The testscripts cycle through a series of crash
6f08c3bdfSopenharmony_ciscenarios. Each test cycle does the following:
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_ci1.  Sets up a crash scenario.
9f08c3bdfSopenharmony_ci2.  Forces a crash.
10f08c3bdfSopenharmony_ci3.  Kdump kernel boots and saves a vmcore.
11f08c3bdfSopenharmony_ci4.  System reboots to 1st kernel.
12f08c3bdfSopenharmony_ci5.  vmcore is validated and results are saved.
13f08c3bdfSopenharmony_ci6.  After a 1 to 2 minute delay, the next crash scenario is setup and
14f08c3bdfSopenharmony_ci    run.
15f08c3bdfSopenharmony_ci
16f08c3bdfSopenharmony_ciThe scripts make use of the crasher module for basic testing of kdump
17f08c3bdfSopenharmony_ciand the new Linux Kernel Dump Test Module (LKDTM) for more involved
18f08c3bdfSopenharmony_citesting. LKDTM makes use of the kprobes infrastructure for inserting
19f08c3bdfSopenharmony_cicrashpoints into the kernel at run-time. Thus the kernel need not be
20f08c3bdfSopenharmony_cipatched and rebuilt.This script also tests kdump dumping on different
21f08c3bdfSopenharmony_cidestinations like ext3, raw and network dump.
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ciKDUMP TEST INSTRUCTION
24f08c3bdfSopenharmony_ci----------------------
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_ciFollow the steps to setup kdump test automation suite.
27f08c3bdfSopenharmony_ci
28f08c3bdfSopenharmony_ciThe tests are written for SuSE Linux Enterprise Server 10 (and onward
29f08c3bdfSopenharmony_cireleases), OpenSUSE, Fedora, Debian, as well as RedHat Enterprise Linux
30f08c3bdfSopenharmony_ci5. Since KDUMP is supported by the above mentioned distro's the tests
31f08c3bdfSopenharmony_ciwere written and tested on them. Contribution towards supporting more
32f08c3bdfSopenharmony_cidistributions are welcome.
33f08c3bdfSopenharmony_ci
34f08c3bdfSopenharmony_ci1. Install these additional packages:
35f08c3bdfSopenharmony_ci
36f08c3bdfSopenharmony_ciFor SLES10 or OpenSUSE Distro :
37f08c3bdfSopenharmony_ci
38f08c3bdfSopenharmony_ci   * kernel-kdump
39f08c3bdfSopenharmony_ci   * kernel-source
40f08c3bdfSopenharmony_ci   * kexec-tools
41f08c3bdfSopenharmony_ci   * zlib-64bit-<xxx> (ppc64 only)
42f08c3bdfSopenharmony_ci   * expect (if dump to a network destination)
43f08c3bdfSopenharmony_ci
44f08c3bdfSopenharmony_ciFor RHEL5 or Fedora distro :
45f08c3bdfSopenharmony_ci
46f08c3bdfSopenharmony_ci   * kexec-tools
47f08c3bdfSopenharmony_ci   * kernel-devel
48f08c3bdfSopenharmony_ci   * kernel-debuginfo rpm (if using crash to verify vmcore)
49f08c3bdfSopenharmony_ci   * kernel-kdump ( only for ppc64 )
50f08c3bdfSopenharmony_ci   * expect (if dump to a network destination)
51f08c3bdfSopenharmony_ci
52f08c3bdfSopenharmony_ci2.  Make sure the partition where the tests are running has space for
53f08c3bdfSopenharmony_cithe tests results and one vmcore file (size of physical memory).
54f08c3bdfSopenharmony_ci
55f08c3bdfSopenharmony_ci3. Modify configuration file runkdump.conf or copy a existing one from
56f08c3bdfSopenharmony_cisample/.
57f08c3bdfSopenharmony_ci
58f08c3bdfSopenharmony_ci4.  Run "runkdump.sh". Carefully check for any errors.
59f08c3bdfSopenharmony_ci
60f08c3bdfSopenharmony_ciFew Important points to remember:
61f08c3bdfSopenharmony_ci
62f08c3bdfSopenharmony_ci* If you need to stop the tests before all tests have run, run "crontab
63f08c3bdfSopenharmony_ci-r" and "killall runkdump.sh" within 1 minute after the 1st kernel
64f08c3bdfSopenharmony_cireboots. Then, if you'd like to carry on tests from the point on, run
65f08c3bdfSopenharmony_ci"crontab kdump.cron", and "./runkdump.sh". If you'd like to start tests
66f08c3bdfSopenharmony_cifrom the beginning, modify the configuration file, and set
67f08c3bdfSopenharmony_ci"REBOOT=0". Then, "./runkdump.sh"
68f08c3bdfSopenharmony_ci
69f08c3bdfSopenharmony_ci* A failure is likely to occur when booting the kdump kernel. If this
70f08c3bdfSopenharmony_cihappens, you'll need to manually reset the system so it reboots back to
71f08c3bdfSopenharmony_cithe 1st kernel and continues on to the next test. For this reason, it's
72f08c3bdfSopenharmony_cibest to monitor the tests from a console. If possible, setup a serial
73f08c3bdfSopenharmony_ciconsole (not a must, any type of console setup will do). If using
74f08c3bdfSopenharmony_ciminicom, enable saving of kernel messages displayed on minicom into a
75f08c3bdfSopenharmony_cifile, by pressing ctrl+a+l on the console. Else, when it is observed
76f08c3bdfSopenharmony_cithat the kdump kernel has failed to boot, manually copy the boot message
77f08c3bdfSopenharmony_ciinto a file to enable the debugging the cause of the hang.
78f08c3bdfSopenharmony_ci
79f08c3bdfSopenharmony_ci* The results are saved in
80f08c3bdfSopenharmony_ci<kdump-test-dir>/log/<hostname>.<date-time>. The "status" file in that
81f08c3bdfSopenharmony_cidirectory shows where you are in the test run. When the "Test run
82f08c3bdfSopenharmony_cicomplete" entry appears in that file, you're done. Verbose log can be
83f08c3bdfSopenharmony_cifound at /tmp/kdump.log.
84f08c3bdfSopenharmony_ci
85f08c3bdfSopenharmony_ci* The test machine would be unavailable for any other work during the
86f08c3bdfSopenharmony_ciperiod of the test run.
87f08c3bdfSopenharmony_ci
88f08c3bdfSopenharmony_ci* System may hang if incorrect partition information is provided for
89f08c3bdfSopenharmony_cidumping, like specifying a partition which does not exist, specifying a
90f08c3bdfSopenharmony_cipartition label which does not exist. This is not ltp kdump bug.
91