btrfs/143: make test case more reliable
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 15 Nov 2017 23:47:59 +0000 (16:47 -0700)
committerEryu Guan <eguan@redhat.com>
Thu, 16 Nov 2017 09:04:03 +0000 (17:04 +0800)
commit53803e93a00cc29bcd1b1e9bef9e7c0d651023a7
tree577fa1cdf546f32d7a61df67026f0381f719398d
parent6ee333cec470933d3b284cc8776d1a0d802b24e9
btrfs/143: make test case more reliable

This changes to use '_scratch_cycle_mount' to drop all caches btrfs
could have in order to avoid an issue that drop_caches somehow
doesn't work on Nikolay's box.

Also use bash -c to run 'read' only when %pid is odd so that we can
read the faulty disk.

Reported-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Tested-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/btrfs/143