generic/499: filter fsx stderr output
authorZorro Lang <zlang@redhat.com>
Tue, 10 Jul 2018 12:52:43 +0000 (20:52 +0800)
committerEryu Guan <guaneryu@gmail.com>
Thu, 12 Jul 2018 05:12:23 +0000 (13:12 +0800)
commit1b5cd501190ecda3a119e2d259d9934afc8e6ad2
tree5efb1492f22e43c1b1379b4f424b4dc6c751a980
parent0804dc173618a1a1fa6d1b916b9b7dcfe72fe1f8
generic/499: filter fsx stderr output

On some old kernel which supports COLLAPSE_RANGE and ZERO_RANGE, but
doesn't support INSERT_RANGE, this case alway fails as:

   QA output created by 499
  +main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling!
   Silence is golden

fsx print one more line to break the golden image.

To fix this issue, redirect both fsx stdout and stderr to a file,
then check the return value.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/499