From Fedora Project Wiki

(improve instructions)
(category)
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:


|setup=
|setup=
# A system with swap-on-zram [[QA:Testcase SwapOnZRAM install and enable|installed and enabled]].
# Make sure your system has swap-on-zram [[QA:Testcase SwapOnZRAM install and enable|installed and enabled]].


|actions=
|actions=
Line 35: Line 35:
}}
}}


[[Category:Test Days Test Cases]]
[[Category:Test Days Test Cases]] [[Category:Package_rust-zram-generator_test_cases]]

Latest revision as of 07:03, 8 July 2020

Description

Test disabling swap-on-zram permanently.

Setup

  1. Make sure your system has swap-on-zram installed and enabled.

How to test

  1. Remove the swap-on-zram default configuration:
    sudo dnf remove zram-generator-defaults

    Alternatively, you can override the default config file with an empty one:

    sudo touch /etc/systemd/zram-generator.conf
  2. Reboot.
  3. Confirm that swap-on-zram is not active. zramctl should not list the /dev/zram0 device:
    $ zramctl
    

    swapon should not list this device either, only disk swap partitions:

    $ swapon
    NAME      TYPE       SIZE USED PRIO
    /dev/sda5 partition 10.4G   0B   -2
    

    The service should be marked as inactive (dead):

    $ sudo systemctl status swap-create@zram0.service
    ● swap-create@zram0.service - Create swap on /dev/zram0
         Loaded: loaded (/usr/lib/systemd/system/swap-create@.service; static; vendor preset: disabled)
         Active: inactive (dead)
           Docs: man:zram-generator(8)
                 man:zram-generator.conf(5)
    
  4. Return your system back to original state (install the removed package or remove the newly created config override).

Expected Results

  1. After removing the default configuration, swap-on-zram should not be active and its device should not be visible in zramctl and swapon commands output.