Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / tools / testing / selftests / zram / zram.sh
blob754de7da426a80a2ae386042d30a5904b44446e6
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 TCID="zram.sh"
5 . ./zram_lib.sh
7 run_zram () {
8 echo "--------------------"
9 echo "running zram tests"
10 echo "--------------------"
11 ./zram01.sh
12 echo ""
13 ./zram02.sh
16 check_prereqs
18 # check zram module exists
19 MODULE_PATH=/lib/modules/`uname -r`/kernel/drivers/block/zram/zram.ko
20 if [ -f $MODULE_PATH ]; then
21 run_zram
22 elif [ -b /dev/zram0 ]; then
23 run_zram
24 else
25 echo "$TCID : No zram.ko module or /dev/zram0 device file not found"
26 echo "$TCID : CONFIG_ZRAM is not set"
27 exit 1