summaryrefslogtreecommitdiff
path: root/tests/bcache/suspend.ktest
blob: e6e1ce5c4861a07a8de821567ecf8d23c3c14774 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash

. $(dirname $(readlink -e ${BASH_SOURCE[0]}))/bcache-test-libs.sh

#config-cache 512M
#config-backing 2G,2G
#config-bucket-size 64k
#config-block-size 4k
#config-writeback

config-cache 2G
config-bucket-size 512k
config-block-size 2k
config-volume 1400M

config-timeout $(stress_timeout)

require-kernel-config	PM,SUSPEND,PM_SLEEP,PM_DEBUG
#require-bin		s2ram

require-kernel-append	no_console_suspend

test_main()
{
    apt-get -qq update; apt-get -qq install --no-install-recommends uswsusp

    #setup_tracing 'bcache:*'

    (
	p="/sys/power"

	sleep 10
	echo freezer	> $p/pm_test
	echo freeze	> $p/state

	#echo 1 > /sys/fs/bcache/suspend
	#s2ram --no_kms --force
    )&

    if false; then
	bcache_format
	setup_bcachefs

	run_dbench
    else
	setup_bcache

	run_antagonist

	run_bcache_stress
    fi
}