summaryrefslogtreecommitdiff
path: root/tests/bcache/reboot_tier.ktest
blob: 3e9f4e73fc11c7f81288485a068d72c5c525f0ab (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
#!/bin/bash

require-lib bcache-test-libs.sh

config-cache 512M
config-tier 2G
config-bucket-size 32k
config-block-size 4k
config-volume 1600M
config-cpus 1
config-timeout 600

test_main()
{
    setup_tracing 'bcache:*'

    if [ $NR_REBOOTS -eq 0 ]; then
	setup_bcache
	ls /dev/bcache*
	block_device_dd /dev/bcache0
    elif [ $NR_REBOOTS -eq 20 ]; then
        stop_bcache
	exit
    else
	existing_bcache
	block_device_verify_dd /dev/bcache0
	echo "test completed"
	block_device_dd /dev/bcache0
    fi
    do_reboot
}