From Fedora Project Wiki

No edit summary
No edit summary
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description=This test case tests hibernation via the pm-hibernate command.
|description=This test case tests hibernation via the pm-hibernate command.
{{admon/warning|If you are running from the LiveCD / USB you will need physical swap partition on the host machine (or LiveUSB) in order to run this test case. Swap on LVM / LUKS is currently not supported when running from the LiveCD / USB.}}
{{admon/note|This test case requires swap partition to be setup on host disk. Physical swap partition should work as well as swap on LVM/LUKS.}}
{{admon/warning|This test case will write and destroy data previously stored on your host swap. If running from live media this is quite hackish approach and something may go wrong. Making backups of your data before running this test case is highly recommended. If you want to be safe and don't like livesystem to write to your host disk, feel free to skip this test case.}}
|setup=
|setup=
# Check that you have {{package|pm-utils}} installed:
# Check that you have {{package|pm-utils}} installed:
Line 10: Line 11:
# Check your swap:
# Check your swap:
#:<pre>$ swapon -s</pre>
#:<pre>$ swapon -s</pre>
#:<pre>$ free</pre>
#:You may see something like:
{{admon/note|Your swap size should be at least your RAM size or more, otherwise the hibernate may fail. Even if your swap size is less than your RAM size, you can try this test case, but please signal this in your report (in case of failure).}}
#:<pre>Filename       Type            Size    Used    Priority&#10;/dev/dm-2            partition      3997692 1856    -1</pre>
#:Note the filename of the swap partition with the highest priority (''/dev/dm-2'' in this case). It will be your resume partition (you will need this filename later when resuming).
#:In case there is no swap partition you need to create one otherwise you cannot complete this test case (or feel free to skip this test case).
{{admon/note|Your swap size should be your RAM size or more, otherwise the hibernation may fail. Even if your swap size is less than your RAM size the hibernation may work correctly (due to compression), but in case of failure please signal this in your report.}}


|actions=
|actions=
Line 18: Line 22:
# Wait for hibernation process to complete (it typycally takes cca. 5-60 seconds).
# Wait for hibernation process to complete (it typycally takes cca. 5-60 seconds).
# Resume by hitting the power button.
# Resume by hitting the power button.
#: If you hibernated from the live media:
## Select boot from the live media.
## When the boot manager displays make sure the default option is selected (e.g. "Start PM Test", the exact value depends on the medium/boot manager you are using) and edit the kernel boot parameters (mostly by hitting Tab).
## Append to the kernel boot parameters ''resume=/dev/dm-2'' (replace /dev/dm-2 by your swap partition, it is the filename you previously noted during the [[#Setup|setup]]).
## Boot (mostly by hitting Enter).
   
   
|results=
|results=

Revision as of 09:02, 9 October 2012

Description

This test case tests hibernation via the pm-hibernate command.

This test case requires swap partition to be setup on host disk. Physical swap partition should work as well as swap on LVM/LUKS.
This test case will write and destroy data previously stored on your host swap. If running from live media this is quite hackish approach and something may go wrong. Making backups of your data before running this test case is highly recommended. If you want to be safe and don't like livesystem to write to your host disk, feel free to skip this test case.

Setup

  1. Check that you have pm-utils installed:
    # rpm -q pm-utils
  2. Check that the hibernate is supported on your platform:
    $ cat /sys/power/state
    If there is disk in the output, it signals that the hibernate is supported.
  3. Check your swap:
    $ swapon -s
    You may see something like:
    Filename	      Type            Size    Used    Priority
    /dev/dm-2             partition       3997692 1856    -1
    Note the filename of the swap partition with the highest priority (/dev/dm-2 in this case). It will be your resume partition (you will need this filename later when resuming).
    In case there is no swap partition you need to create one otherwise you cannot complete this test case (or feel free to skip this test case).
Your swap size should be your RAM size or more, otherwise the hibernation may fail. Even if your swap size is less than your RAM size the hibernation may work correctly (due to compression), but in case of failure please signal this in your report.

How to test

  1. Run the following command:
    # pm-hibernate
  2. Wait for hibernation process to complete (it typycally takes cca. 5-60 seconds).
  3. Resume by hitting the power button.
    If you hibernated from the live media:
    1. Select boot from the live media.
    2. When the boot manager displays make sure the default option is selected (e.g. "Start PM Test", the exact value depends on the medium/boot manager you are using) and edit the kernel boot parameters (mostly by hitting Tab).
    3. Append to the kernel boot parameters resume=/dev/dm-2 (replace /dev/dm-2 by your swap partition, it is the filename you previously noted during the setup).
    4. Boot (mostly by hitting Enter).

Expected Results

  1. System correctly hibernates.
  2. System correctly resumes.