Linux 4.8-rc8
[linux/fpc-iii.git] / tools / testing / selftests / zram / zram.sh
blob683a292e329015f3044194e753dd9fa9c62ba48a
1 #!/bin/bash
2 TCID="zram.sh"
4 . ./zram_lib.sh
6 run_zram () {
7 echo "--------------------"
8 echo "running zram tests"
9 echo "--------------------"
10 ./zram01.sh
11 echo ""
12 ./zram02.sh
15 check_prereqs
17 # check zram module exists
18 MODULE_PATH=/lib/modules/`uname -r`/kernel/drivers/block/zram/zram.ko
19 if [ -f $MODULE_PATH ]; then
20 run_zram
21 elif [ -b /dev/zram0 ]; then
22 run_zram
23 else
24 echo "$TCID : No zram.ko module or /dev/zram0 device file not found"
25 echo "$TCID : CONFIG_ZRAM is not set"
26 exit 1