1f21fb798SNaresh Kamboju#!/bin/bash
2f21fb798SNaresh KambojuTCID="zram.sh"
3f21fb798SNaresh Kamboju
4f21fb798SNaresh Kambojurun_zram () {
5f21fb798SNaresh Kambojuecho "--------------------"
6f21fb798SNaresh Kambojuecho "running zram tests"
7f21fb798SNaresh Kambojuecho "--------------------"
8f21fb798SNaresh Kamboju./zram01.sh
9f21fb798SNaresh Kambojuecho ""
10f21fb798SNaresh Kamboju./zram02.sh
11f21fb798SNaresh Kamboju}
12f21fb798SNaresh Kamboju
13f21fb798SNaresh Kamboju# check zram module exists
14f21fb798SNaresh KambojuMODULE_PATH=/lib/modules/`uname -r`/kernel/drivers/block/zram/zram.ko
15f21fb798SNaresh Kambojuif [ -f $MODULE_PATH ]; then
16f21fb798SNaresh Kamboju	run_zram
17f21fb798SNaresh Kambojuelif [ -b /dev/zram0 ]; then
18f21fb798SNaresh Kamboju	run_zram
19f21fb798SNaresh Kambojuelse
20f21fb798SNaresh Kamboju	echo "$TCID : No zram.ko module or /dev/zram0 device file not found"
21f21fb798SNaresh Kamboju	echo "$TCID : CONFIG_ZRAM is not set"
22f21fb798SNaresh Kamboju	exit 1
23f21fb798SNaresh Kambojufi
24