Testing suspend and resume support in device drivers

8 篇文章 0 订阅
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
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
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
testing the new driver.  Please see Documentation/power/basic-pm-debugging.txt
for more information about the debugging of suspend/resume functionality.

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:

a) Build the driver as a module, load it and try the test modes of hibernation
   (see: Documentation/power/basic-pm-debugging.txt, 1).

b) Load the driver and attempt to hibernate in the "reboot", "shutdown" and
   "platform" modes (see: Documentation/power/basic-pm-debugging.txt, 1).

c) Compile the driver directly into the kernel and try the test modes of
   hibernation.

d) Attempt to hibernate with the driver compiled directly into the kernel
   in the "reboot", "shutdown" and "platform" modes.

e) Try the test modes of suspend (see: Documentation/power/basic-pm-debugging.txt,
   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
   (see: Documentation/power/basic-pm-debugging.txt, 2).

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.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值