linux-sg2042/tools/testing/selftests/zram
Shuah Khan (Samsung OSG) 685814466b selftests: zram: return Kselftest Skip code for skipped tests
When zram test is skipped because of unmet dependencies and/or
unsupported configuration, it exits with error which is treated as
a fail by the Kselftest framework. This leads to false negative result
even when the test could not be run.

Change it to return kselftest skip code when a test gets skipped to
clearly report that the test could not be run.

Kselftest framework SKIP code is 4 and the framework prints appropriate
messages to indicate that the test is skipped.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-06-18 09:11:09 -06:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
README selftests/zram: replace ZRAM_LZ4_COMPRESS 2016-09-20 09:00:01 -06:00
config selftests: create test-specific kconfig fragments 2016-02-25 09:47:52 -07:00
zram.sh selftests: zram: return Kselftest Skip code for skipped tests 2018-06-18 09:11:09 -06:00
zram01.sh selftests/zram: must be run as root 2015-09-01 10:51:32 -06:00
zram02.sh selftests/zram: must be run as root 2015-09-01 10:51:32 -06:00
zram_lib.sh selftests: zram: return Kselftest Skip code for skipped tests 2018-06-18 09:11:09 -06:00

README

zram: Compressed RAM based block devices
----------------------------------------
* Introduction

The zram module creates RAM based block devices named /dev/zram<id>
(<id> = 0, 1, ...). Pages written to these disks are compressed and stored
in memory itself. These disks allow very fast I/O and compression provides
good amounts of memory savings. Some of the usecases include /tmp storage,
use as swap disks, various caches under /var and maybe many more :)

Statistics for individual zram devices are exported through sysfs nodes at
/sys/block/zram<id>/

Kconfig required:
CONFIG_ZRAM=y
CONFIG_CRYPTO_LZ4=y
CONFIG_ZPOOL=y
CONFIG_ZSMALLOC=y

ZRAM Testcases
--------------
zram_lib.sh: create library with initialization/cleanup functions
zram.sh: For sanity check of CONFIG_ZRAM and to run zram01 and zram02

Two functional tests: zram01 and zram02:
zram01.sh: creates general purpose ram disks with ext4 filesystems
zram02.sh: creates block device for swap

Commands required for testing:
 - bc
 - dd
 - free
 - awk
 - mkswap
 - swapon
 - swapoff
 - mkfs/ mkfs.ext4

For more information please refer:
kernel-source-tree/Documentation/blockdev/zram.txt