btrfs: fix filtering of scratch device in test case 048
authorFilipe Manana <fdmanana@suse.com>
Thu, 25 Apr 2019 00:37:09 +0000 (01:37 +0100)
committerEryu Guan <guaneryu@gmail.com>
Fri, 26 Apr 2019 03:10:09 +0000 (11:10 +0800)
commit195a650883b0746a366437a47e12a6a5775ef978
tree04d0fd19d111d5af3f09fdef2edb8df97679f512
parent8afebc02235eda1ec1c5a55ba9d37c0a881d88b3
btrfs: fix filtering of scratch device in test case 048

The recent commit 4529b20e1aa8f9 ("btrfs/048: amend property validation
cases"), does not properly filter the scratch device because the error
messages are sent to stderr and not to stdout, and the pipe filter only
gets input from the stdout of the btrfs utility. We need to redirect the
stderr of the btrfs utility to its stdout.

Further, the golden output had the path "/mnt/scratch" hardcoded, instead
of using SCRATCH_MNT. Fix that as well.

The test was failing on any setup where the scratch device is not mounted
at "/mnt/scratch".

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/048
tests/btrfs/048.out