]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - tools/testing/selftests/zram/zram.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / tools / testing / selftests / zram / zram.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 TCID="zram.sh"
4
5 . ./zram_lib.sh
6
7 run_zram () {
8 echo "--------------------"
9 echo "running zram tests"
10 echo "--------------------"
11 ./zram01.sh
12 echo ""
13 ./zram02.sh
14 }
15
16 check_prereqs
17
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
28 fi