Blame view
Documentation/power/drivers-testing.txt
2.14 KB
5b7952021 Documentation: As... |
1 2 3 4 5 6 7 8 |
Testing suspend and resume support in device drivers (C) 2007 Rafael J. Wysocki <rjw@sisk.pl>, GPL 1. Preparing the test system Unfortunately, to effectively test the support for the system-wide suspend and resume transitions in a driver, it is necessary to suspend and resume a fully functional system with this driver loaded. Moreover, that should be done |
ce2b7147b PM: Suspend/hiber... |
9 10 11 |
several times, preferably several times in a row, and separately for hibernation (aka suspend to disk or STD) and suspend to RAM (STR), because each of these cases involves slightly different operations and different interactions with |
5b7952021 Documentation: As... |
12 13 14 15 16 |
the machine's BIOS. Of course, for this purpose the test system has to be known to suspend and resume without the driver being tested. Thus, if possible, you should first resolve all suspend/resume-related problems in the test system before you start |
5e3c3ac9d Fix wrong filenam... |
17 18 |
testing the new driver. Please see Documentation/power/basic-pm-debugging.txt for more information about the debugging of suspend/resume functionality. |
5b7952021 Documentation: As... |
19 20 21 22 23 |
2. Testing the driver Once you have resolved the suspend/resume-related problems with your test system without the new driver, you are ready to test it: |
ce2b7147b PM: Suspend/hiber... |
24 |
a) Build the driver as a module, load it and try the test modes of hibernation |
7ac4dcabd PM: Fix reference... |
25 |
(see: Documentation/power/basic-pm-debugging.txt, 1). |
5b7952021 Documentation: As... |
26 |
|
ce2b7147b PM: Suspend/hiber... |
27 |
b) Load the driver and attempt to hibernate in the "reboot", "shutdown" and |
7ac4dcabd PM: Fix reference... |
28 |
"platform" modes (see: Documentation/power/basic-pm-debugging.txt, 1). |
5b7952021 Documentation: As... |
29 |
|
ce2b7147b PM: Suspend/hiber... |
30 31 |
c) Compile the driver directly into the kernel and try the test modes of hibernation. |
5b7952021 Documentation: As... |
32 |
|
ce2b7147b PM: Suspend/hiber... |
33 34 |
d) Attempt to hibernate with the driver compiled directly into the kernel in the "reboot", "shutdown" and "platform" modes. |
5b7952021 Documentation: As... |
35 |
|
7ac4dcabd PM: Fix reference... |
36 |
e) Try the test modes of suspend (see: Documentation/power/basic-pm-debugging.txt, |
ce2b7147b PM: Suspend/hiber... |
37 38 39 40 |
2). [As far as the STR tests are concerned, it should not matter whether or not the driver is built as a module.] f) Attempt to suspend to RAM using the s2ram tool with the driver loaded |
7ac4dcabd PM: Fix reference... |
41 |
(see: Documentation/power/basic-pm-debugging.txt, 2). |
5b7952021 Documentation: As... |
42 43 44 45 |
Each of the above tests should be repeated several times and the STD tests should be mixed with the STR tests. If any of them fails, the driver cannot be regarded as suspend/resume-safe. |