3
. $(dirname $0)/../include.rc
4
. $(dirname $0)/../volume.rc
13
TEST $CLI volume create $V0 $H0:$B0/${V0}1
14
TEST $CLI volume start $V0
17
TEST $CLI volume bitrot $V0 enable
23
TEST $CLI volume set $V0 performance.quick-read off
25
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" get_bitd_count
27
EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Active' scrub_status $V0 'State of scrub'
28
EXPECT_WITHIN $PROCESS_UP_TIMEOUT '/var/log/glusterfs/bitd.log' scrub_status $V0 'Bitrot error log location'
29
EXPECT_WITHIN $PROCESS_UP_TIMEOUT '/var/log/glusterfs/scrub.log' scrub_status $V0 'Scrubber error log location'
32
TEST $CLI volume set $V0 features.expiry-time 1
35
TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
39
TEST $CLI volume set $V0 performance.quick-read off
42
TEST `echo "1234" > $M0/FILE1`
43
EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'trusted.bit-rot.signature' check_for_xattr 'trusted.bit-rot.signature' "/$B0/${V0}1/FILE1"
46
TEST $CLI volume bitrot $V0 disable
49
TEST `echo "write" >> $M0/FILE1`
55
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
58
TEST $CLI volume bitrot $V0 enable
64
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" get_bitd_count
66
EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Active' scrub_status $V0 'State of scrub'
67
EXPECT_WITHIN $PROCESS_UP_TIMEOUT '/var/log/glusterfs/bitd.log' scrub_status $V0 'Bitrot error log location'
68
EXPECT_WITHIN $PROCESS_UP_TIMEOUT '/var/log/glusterfs/scrub.log' scrub_status $V0 'Scrubber error log location'
71
TEST $CLI volume bitrot $V0 scrub ondemand
80
TEST ! getfattr -n 'trusted.bit-rot.bad-file' $B0/${V0}1/FILE1
83
TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0